Welcome! Log In Create A New Profile

Advanced

Problem with rewriting query strings

Posted by ScyDark 
Problem with rewriting query strings
April 26, 2011 05:01AM
Hello,

I am currently trying to convert my Apache RewriteRule to Nginx HttpRewriteModule.
Almost everything is working, except query strings :

My URL is :

http://www.mysite.com/slug/page.htm?lng=en

After rewriting, it must look like :

http://www.mysite.com/index.php?page=slug/page.htm&lng=en

But it actually looks like :

http://www.mysite.com/index.php?page=slug/page.html?lng=en

Here is my rewrite rule :

rewrite ^([a-z0-9/-]*[a-z0-9-])\.htm$ /index.php?page=$1.htm permanent;

Do you have any solution ?

Thank you for your help.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 184
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready