Combining "RewriteEngine off" AND Password Protected Directories
Permalink 1 user found helpful
Hi all!
I'm a bit stumped. On C5 sites, if I have a folder that I want to hide from the rewrite engine (say, mysite.com/desiredfolder), I make an .htaccess in the desired folder that just says:
Works great.
Or, on non-C5 sites, when I want to easily password protect a directory via CPanel, it writes a little .htaccess for you in the desired folder:
Also works great.
BUT, I can't seem to find a way to have them both work together. If I use the password protect folder above, it ignores the RewriteEngine off portion, whether it's before OR after the code in the example above, and leads to the broken C5 "Page Not Found" image.
How do I use CPanel's "Password Protect Directory" functionality AND stop C5 from rewriting the directory so I can actually get in there?
Thanks!
I'm a bit stumped. On C5 sites, if I have a folder that I want to hide from the rewrite engine (say, mysite.com/desiredfolder), I make an .htaccess in the desired folder that just says:
RewriteEngine off
Works great.
Or, on non-C5 sites, when I want to easily password protect a directory via CPanel, it writes a little .htaccess for you in the desired folder:
AuthType Basic AuthName "modulesformi" AuthUserFile "/home/rootusername/.htpasswds/public_html/desiredfolder/passwd" require valid-user
Also works great.
BUT, I can't seem to find a way to have them both work together. If I use the password protect folder above, it ignores the RewriteEngine off portion, whether it's before OR after the code in the example above, and leads to the broken C5 "Page Not Found" image.
How do I use CPanel's "Password Protect Directory" functionality AND stop C5 from rewriting the directory so I can actually get in there?
Thanks!
In your htaccess file