Rewriting all requests to index.php

Denis F. Latypoff latypoff at yandex.ru
Mon Jul 12 23:54:40 MSD 2010


12.07.10, 23:46, "astrochase" <nginx-forum at nginx.us>:

> I'm new to Nginx. How do I rewrite all requests to index.php? So for
>  example, if http://www.example.com/some/path/ is requested, I'd like
>  http://www.example.com/index.php to transparently handle it.
>  
>  How can I do this?
>  

location / {
    root                 /path/to/www;
    include            fastcgi_params;
    fastcgi_pass    ...;
    fastcgi_param  SCRIPT_FILENAME /path/to/www/index.php;
}

-- 
br, Denis F. Latypoff.



More information about the nginx mailing list