404 problem

etrader nginx-forum at nginx.us
Mon Jul 11 11:20:27 MSD 2011


There is no real sub-directory, they are virtual folders created by
rewrites; e.g. domain.com/search/keyword.html instead of
search.php?q=keyword

Config is as

server {    server_name  .domain.com;
listen       80;
root  /home/domain.com;
error_page 404 = /404.php;
index  index.html index.php;
rewrite ^/search/(.*).html /search.php?q=$1 last;

    location ~ \.php$ {
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include /opt/nginx/conf/fastcgi_params;
}
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,212060,212063#msg-212063




More information about the nginx mailing list