开发者

How do I Redirect a URL in PHP using .htaccess?

How do I redirect a URL in PHP? If I use .htaccess to redirect, then it's asking me for authentication (username & password). I want to redir开发者_如何学JAVAect to a URL without any authentication. Is it possible in PHP? I don't want to use headers or meta tags or window.location to redirect. Is there any other way is possible?


My guess is that you perhaps copy/pasted some code into your .htaccess file has basic authentication?

You only need one line to do that in .htaccess

Redirect 301 /oldpath http://sitecom/newpath
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜