Welcome! Log In Create A New Profile

Advanced

apache to nginx rewrite help

Posted by KingPin 
apache to nginx rewrite help
June 01, 2010 12:40PM
Can anyone help me convert this rewrite below to nginx syntax?
[code]
RewriteRule ^(.*).xml $1.php?%{QUERY_STRING}
[/code]


Been fighting with this one all morning but it just refuses to work properly....

The php stuff is in a subdir called info so I have tried using this as the rule in my vhost.conf :
[code]
location /info {
root /home/user/public_html/info;
index index.php index.html index.htm;
rewrite ^/info/(.*)\.(xml|XML)$ $1.php?$query_string break;
}
[/code]

when I check the page in FF i get this in FF
[code]
Error loading stylesheet: A network error occured loading an XSLT stylesheet:
http://www.domain.com/info/_layout/pageIndex.xsl
[/code]

and this in error log in nginx :
[code]
2010/06/01 11:42:14 [error] 1647#0: *142363 open() "/home/user/public_html/info/info/_layout/pageIndex.xsl" failed (2: No such file or directory), client: 24.184.191.9, server: domain.com, request: "GET /info/_layout/pageIndex.xsl HTTP/1.1",
[/code]

not sure why it doubles up in there....

thank you for any help.



Edited 1 time(s). Last edit at 06/01/2010 12:40PM by KingPin.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 267
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready