how to redirect a dynamic URL using .htaccess? -
is there way redirect link :
http://example.com/?page=profile.php&id=100
to
http://example.com/profile.php?id=100
using htaccess ?? way know can redirect
http://example.com/?page=profile.php
to:
http://example.com/profile.php
using 301 redirect
but asking id
in first link use &
while in second url use ?
there way make redirect taking id parameter in consideration
try :
rewriteengine on rewritecond %{query_string} ^page=([^&]+)&id=([^&]+) [nc] rewriterule ^ /%1?id=%2 [nc,r,l]
Comments
Post a Comment