error_page and named locations
cynix
cynix at cynix.org
Wed Dec 10 18:52:22 MSK 2008
cynix <cynix at ...> writes:
>
> But if I used the following:
>
> location ~ \.php$ {
>
> error_page 404 = /index.php;
> }
>
> Then it will work as intended.
>
Just to clarify, I meant
location ~ \.php$ {
fastcgi_pass 127.0.0.1:1234;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /www_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_intercept_errors on;
error_page 404 = /index.php;
}
works. I used "..." instead of retyping the whole thing to save a few keystrokes
but don't know why it didn't show.
More information about the nginx
mailing list