I'm trying to add password protection via my cpanel on my server. I have a .htaccess file that rewrites my public_html root to public_html/links because I have VBaLinks as my main focus of the site.
This all works perfectly until I try and add the password protection. The cpanel protection adds a .httaccess file under the directory I want to protect which works fine as long as the root rewrite .httaccess file is not active. As soon as it is, the protected folder always give a 404 error.
Can anyone with better .httaccess skils then me tell me why? The code is posted below with the root .httaccess file first then the password protected directory .httaccess file second.
Thanks!
Latest Links on the WEB and Legendary Threads
Code:# Turn on rewrites. RewriteEngine on RewriteRule index\.html index.php [NC,R] RewriteRule index\.htm index.php [NC,R] # Only apply to URLs on this domain RewriteCond %{HTTP_HOST} ^(www.)?legendarythreads.net$ # Only apply to URLs that aren't already under folder. RewriteCond %{REQUEST_URI} !^/links/ # Don't apply to URLs that go to existing files or folders. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite all those to insert /folder. RewriteRule ^(.*)$ /links/$1 # Also redirect the root folder. RewriteCond %{HTTP_HOST} ^(www.)?legendarythreads.net$ RewriteRule ^(/)?$ links/index.php [L]Code:AuthName "check" AuthUserFile "/home/frest/.htpasswds/public_html/ppcheck/passwd" AuthType Basic require valid-user


LinkBack URL
About LinkBacks





Reply With Quote