I am very new to mod rewrite. I need to redirect any user with "citzenhawk" parameter in their url to my url
for example
http://www.mywebsite.com/?sc=CX12N003&cm_mmc=affiliate--citizenhawk--nooffer-_-na&prfc=5&clickid=0004c845fa9a87050a4277221a003262
should result into
http://www.mywebsite.com/
Here are my rewrite conditions:
RewriteCond %{QUERY_STRING} (&|^)cm_mmc=(.)citizenhawk(.)(&|$)$
RewriteRule ^/rrs/ [NC,R=302,L]
Where am I going wrong? Is my RewriteCond wrong?
index.php, a.htaccess(with the rules inside) and accessindex.php?sc=CX12N003&cm_mmc=affiliate--citizenhawk--nooffer-_-na&prfc=5&clickid=0004c845fa9a87050a4277221a003262– j0k Aug 29 '12 at 18:48RewriteRule ^.* /$1? [R=permanent]. – galeksic Aug 29 '12 at 19:09http://www.mywebsite.com/?sc=CX12N003&cm_mmc=affiliate--citizenhawk--nooffer-_-na&prfc=5&clickid=0004c845fa9a87050a4277221a003262, it should be redirected tohttp://www.mywebsite.com/rrs/. sorry i forgot to mention this before. – modrewriteNewbie Aug 29 '12 at 19:16RewriteRule ^.* /rrs/$1? [R=permanent]. – galeksic Aug 29 '12 at 19:26[R=permanent]is for Redirect Permanent. Same as a 301, in fact. I've updated my answer with update from @galeksic – j0k Aug 29 '12 at 20:30