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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -