Hello to all,
I have a quite fresh new account on TCH, and while I was playing with .htaccess I got this kind of problem:
In the main directory I have an .htaccess file with a redirect like this:
>RewriteCond %{HTTP_HOST} ^andreaplanet\.com
RewriteRule ^(.*)$ http://www.andreaplanet.com/$1 [R=permanent,L]
So every link to andreaplanet.com will be redirected to www.andreaplanet.com. This makes reading statistics more easier.
In my subdirectory protectme I have this simple .htaccess file in order to protect it:
>AuthType Basic
AuthName "Authorization Required"
AuthUserFile "/home/...passwd"
require valid-user
If I ask for the page http://www.andreaplanet.com/protectme then I get the window asking me the password, everything is ok.
The problem is when I try to show up the link http://andreaplanet.com/protectme
Instead of getting the window for asking the password I get an Error 401.
Any suggestions on how to fix this problem without removing the redirect/passwd?
Andrea