regex - Permanent redirect of page dependent on parameters -


i want redircet www.mysite.com/abc/mypage.php?id=123 www.mysite.com/newpage.htm

i've tried in .htaccess file doesn't work. (i 404)

redirectpermanent /abc/mypage\.php\?id=123 /newpage.htm 

what correct syntax?

no cannot match query_string using redirect directive. can use mod_rewrite instead:

rewriteengine on  rewritecond %{the_request} ^[a-z]{3,}\s/+abc/mypage\.php\?id=123[&s] [nc] rewriterule ^ /newpage.htm? [r=302,l] 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -