Forum Moderators: phranque
/modules.php?name=News&file=article&sid=3550
To:
/archives/3550
RewriteCond %{QUERY_STRING} ^name=News&file=article&sid=([0-9]*)
RewriteRule ^modules\.php$ /archives/$1 [R=301,L]
I get this:
/archives/3551?name=News&file=article&sid=3550
What am I doing wrong?
Thanks!
Gil.
By the way, I wrote a Python script to convert PHPNuke MySQL data to Wordpress: <snip>
[edited by: jdMorgan at 7:20 pm (utc) on Dec. 15, 2009]
[edit reason] No URLs, please. See TOS. [/edit]
Stick a question mark on the end of the substitution URL to clear the current query string (also as documented).
Also, you should include the protocol and the canonical hostname in the substitution address:
RewriteCond %{QUERY_STRING} ^name=News&file=article&sid=([0-9]*)
RewriteRule ^modules\.php$ [i]http://www.example.com[/i]/archives/[b]%1?[/b] [R=301,L]