Welcome! Log In Create A New Profile


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?
RewriteRule ^(.*).xml $1.php?%{QUERY_STRING}

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 :
location /info {
root /home/user/public_html/info;
index index.php index.html index.htm;
rewrite ^/info/(.*)\.(xml|XML)$ $1.php?$query_string break;

when I check the page in FF i get this in FF
Error loading stylesheet: A network error occured loading an XSLT stylesheet:

and this in error log in nginx :
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:, server: domain.com, request: "GET /info/_layout/pageIndex.xsl HTTP/1.1",

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: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready