Requests ending with / (slash) are returning 404
Edho P Arief
edhoprima at gmail.com
Wed Apr 7 12:50:47 MSD 2010
2010/4/7 Igor Sysoev <igor at sysoev.ru>:
> location / {
> try_files $uri $uri.php $uri/ =404;
>
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_intercept_errors on;
> fastcgi_index index.php;
> include /usr/local/nginx/conf/fastcgi_params;
> fastcgi_param SCRIPT_FILENAME
> /home/public_html/domain.com.au/public/$fastcgi_script_name;
> }
>
> or
>
> location / {
> try_files $uri $uri.php ${uri}index.php =404;
>
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_intercept_errors on;
> include /usr/local/nginx/conf/fastcgi_params;
> fastcgi_param SCRIPT_FILENAME
> /home/public_html/domain.com.au/public/$fastcgi_script_name;
> }
>
wouldn't static files also passed to fastcgi in this case?
how about
location / {
try_files $uri @php;
}
location @php {
try_files $uri.php $uri/ =404;
...fastcgi stuff...
}
?
--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
More information about the nginx
mailing list