开发者

301 Redirect to static html from a single parameter php page

开发者 https://www.devze.com 2023-02-07 11:15 出处:网络
I would like to change my page i.e. oldpa开发者_运维知识库ge.php?id=11 to http://www.example.com/newpage.html.

I would like to change my page i.e. oldpa开发者_运维知识库ge.php?id=11 to http://www.example.com/newpage.html.

Can any one please help. Thank you..


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]
0

精彩评论

暂无评论...
验证码 换一张
取 消