vijay kumar ambala
vijay kumar ambala

Reputation: 1

301 Redirect to static html from a single parameter php page

I would like to change my page i.e. oldpage.php?id=11 to http://www.example.com/newpage.html.

Can any one please help. Thank you..

Upvotes: 0

Views: 386

Answers (1)

sberry
sberry

Reputation: 132088

If you have mod_rewrite installed / enabled then this should work:

RewriteEngine On
RewriteCond %{QUERY_STRING} ^id=11$ [NC]
RewriteRule ^oldpage\.php$ http://www.example.com/newpage.html? [L,R=301]

Upvotes: 1

Related Questions