Portal Home > Knowledgebase > Articles Database > How to redirect QueryString with htaccess / mod_rewrite ?
How to redirect QueryString with htaccess / mod_rewrite ?
Posted by AaliyahRoma, 06-04-2009, 02:06 PM |
Old url : example.com/oldpage?param1=value1¶m1=value2
New url: example.com/newpage/value1/value2
This code does not work!
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^page?param1=(.*)¶m2=(.*)$ newpage/$1/$2 [R=301,QSA,L]
How can I fix this issue?
|
Posted by Dualism, 06-04-2009, 02:38 PM |
Here you are
|
Posted by AaliyahRoma, 06-04-2009, 02:43 PM |
You didnt get the question and your code does not work.
|
Posted by Dualism, 06-04-2009, 03:06 PM |
OK, say ..
The original URL:
http://www.yoursite.com/oldpage.php?...¶m1=value2
The rewritten URL:
http://www.yoursite.com/newpage/value1/value2
And rewrite links.
|
Posted by foobic, 06-04-2009, 06:35 PM |
|
Add to Favourites Print this Article
Also Read