Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need your advice.

I implemented the rewrite mod for the articles, switching from a dynamic url to a static url like this:

RewriteRule ^([^/]+)/([^/]+).htm /testo.php?Id=$1&nomefile=$2 [L]

Everything works fine, but there is a problem when I do a redirect 301 like this:
Redirect 301 /11/pippo.htm /11/super-pippo.htm

i.e. redirect 301 from to

Well in this case it also brings the variables with it and I get this wrong link:
instead it should be:

I'm definitely missing something at the moment, if possible I'm waiting for your professional support.

Thank you

What I have tried:

Resolve problem Redirect 301 that generates incorrect static URL with variables
Updated 15-Sep-23 9:06am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900