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

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -