andreaplanet Posted January 13, 2005 Posted January 13, 2005 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 Quote
snipe Posted January 16, 2005 Posted January 16, 2005 Have you tried removing the mod_rewrite code? While I wouldn't *think* it shoud cause a problem, its worth a shot, especially since its happening without www, but its working fine *with* www. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.