开发者

Redirect existing url .php to new url

开发者 https://www.devze.com 2023-01-22 04:30 出处:网络
How to redirect existing url to new url? Sample : I have www.a.com/help.php in google/yahoo :when visitor click this link \"www.a.com/help.php\" on address bar automat开发者_如何学Goically change be

How to redirect existing url to new url?

Sample : I have www.a.com/help.php

in google/yahoo : when visitor click this link "www.a.com/help.php" on address bar automat开发者_如何学Goically change be www.a.com/help.

Because in .htaccess I was rewrite www.a.com/help and this condiction is success.

The problem is how to change automatically on address bar www.a.com/help.php --> www.a.com/help

Using .htaccess or other tricks?

Thanks.


You could use

<?php
header("Location: http://www.a.com/help");

That should change the addressbar.

With .htaccess you could try

redirect 301 /help.php /help

Here you can read more on htaccess redirect

0

精彩评论

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

关注公众号