Rewrite rule for nginx from Apache

Igor Sysoev igor at
Wed May 18 10:49:21 MSD 2011

On Tue, May 17, 2011 at 06:51:33PM -0400, the_traveller wrote:
> First of all thank you very much mr Igor This is a great help for me
> but as i'm new to nginx  so i'm little bit careful
> but i have afew more things to ask about
> do i have to make any defination to these params
> maindir

"/maindir/" is from
RewriteBase /maindir/

By default it is "/", for example,

location /chat/

SCRIPT_FILENAME is FastCGI parameter which contains file system script name.

> which is used as
> fastcgi_param SCRIPT_FILENAME /path/to/script/pages.php;
> location /maindir/chat/
> Or they just have to be written as they are??

Igor Sysoev

More information about the nginx mailing list