Welcome! Log In Create A New Profile

Advanced

Rewrite problem

Posted by Devile 
Rewrite problem
March 15, 2012 02:21AM
I'm trying to do a simple redirect but for some reason it never works. I need this:

/dir/script1.php?t-80893.html -> /script2.php?t=80893

and tried:

rewrite ^/dir/script1\.php\?t-(.*)\.html$ /script2.php?t=$1 last;

but I just get a 404 error. I tried different options but it never works. It's like the ? breaks the whole rewrite rule. Any idea how I can make a redirect like this work?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 140
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