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
精彩评论