I am running apache2 and php5 in my windows PC.
I have protected my directory using .htaccess
and.htpasswd
. If login information is not set
Revised answer...I believe you can do this with mod_rewrite. Here is an example I found:
# turn on rewrite engine
RewriteEngine on
# if authorization header is empty (non-authenticated client)
RewriteCond %{HTTP:Authorization} ^$
# redirect to new url
RewriteRule /current/path /new/path
Caveat emptor...I'm not able to test this at the moment. Give it a try though, put this in your .htaccess and change the paths to suit your environment.