views:

48

answers:

1

hi all, how to redirect a url in php? if i use htaccess to redirect, then its asking me a authentication (username & pwd). i want to redirect to url without any authentication. is it possible in php. i dont want to use headers or meta tags or window.location to relocate i.e redirect. any other way is possible? thanks in advance.

+1  A: 

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
Jason