url rewriting problem

darud nginx-forum at nginx.us
Tue Dec 28 21:10:31 MSK 2010


Hi,
I'm new to nginx, and I need to use many scripts which use apache2
rewrite rules.

One of my script use two htaccess:

[code]
find /var/www/vhosts/mysite.com/httpdocs/ -name .htaccess
./manager/install/.htaccess
./manager/.htaccess
[/code]

./manager/install/.htaccess  => http://pastebin.com/2S2dh0NL

I tried:
[code]
location ^~ /install/ {
                root
/var/www/vhosts/mysite.com/httpdocs/manager/install;
                if (!-e $request_filename)
                {
                        return 403;
                }
                rewrite ^domains /index.php?page=domains break;
                rewrite (.*)\.php /index.php?page=$1&$query_string
break;
        }
[/code]

Result:
 - http://www.mysite.com/manager/install.php not working
 - http://www.mysite.com/manager/index.php?page=install is working

so there is a problem.


./manager/.htaccess => http://pastebin.com/u55eCFYA

Still didn't try, i need to setup my script first.

Thanks for your help !

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




More information about the nginx mailing list