Welcome! Log In Create A New Profile

Advanced

rewrite domain.com/index.php?show/name/title -> domain.com/show/name/title

Grzegorz Sienko
December 19, 2009 09:20AM
Hello

I have a little problem with my rewrite and I need assist.

It's my config:
--------------------------------------
server {
listen 80;
server_name .domain.com;
root /home/resources/domain/db;
index index.php;

access_log /home/log/nginx/domain.access.log main;
error_log /home/log/nginx/domain.error.log error;

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/home/resources/domain/db$fastcgi_script_name;
include fastcgi_params;
}

rewrite ^/([^\.]+)/([^\.]+)$ /index.php?$1/$2 last;
rewrite ^/([^\.]+)/([^\.]+)/([^\.]+)$ /index.php?$1/$2/$3 last;

}

-----------------------------

and it seems to work, but with one problem. I cannot load any graphics,
javascript file etc (anything file.extension)

2009/12/19 14:58:18 [error] 26753#0: *3018846 open()
"/home/resources/domain/db/show/anime/hidamari-sketch-x-365/599/140/img/db_script.gif"
failed (2: No such file or directory), client: 84.10.8.*, server: domain.com,
request: "GET /show/anime/hidamari-sketch-x-365/599/140//img/db_script.gif
HTTP/1.1", host: "domain.com", referrer: "
http://domain.com/show/anime/hidamari-sketch-x-365/599/140//2"

File is here: domain.com/img/db_script.gif. And I don't know hot to fix it
^^. Anyone can help me? :)

--
Best Regards
Grzegorz Sienko
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

rewrite domain.com/index.php?show/name/title -> domain.com/show/name/title

Grzegorz Sienko December 19, 2009 09:20AM

Re: rewrite domain.com/index.php?show/name/title -> domain.com/show/name/title

Igor Sysoev December 19, 2009 03:12PM

Re: rewrite domain.com/index.php?show/name/title -> domain.com/show/name/title

Grzegorz Sienko December 20, 2009 06:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 314
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready