I am trying to password protect a subfolder but .htaccess in the parent seems to have something stopping it working, does anyone know what it may be.
When I enable password protection in cpanel the subfolder address gives error 404
When I have tried adding
to my parent .htaccess
RewriteCond %{REQUEST_URI} "/my_sub_folder/"
RewriteRule (.*) $1 [L]
this gets gets me to the username and password window but keeps repeating and goes no further, my parent .htaccess is below if anyone can help.
I have tried adding to the subfolder but gets me know where also.
Thanks
John
```php
DirectoryIndex index.html index.php
RewriteEngine on
Some hostings require RewriteBase to be uncommented
Example:
Your store url is [url=“http://www.yourcompany.com/store/cart”]http://www.yourcompany.com/store/cart[/url]
So “RewriteBase” should be:
RewriteBase /store/cart
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php?sef_rewrite=1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} .*\/catalog\/.*
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteRule . index.php?sef_rewrite=1 [L,QSA]
# bof smartoptimizer
ExpiresActive On
ExpiresDefault "access plus 10 years"
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1
FileETag none
# eof smartoptimizer
#expire headers
ExpiresActive On
ExpiresDefault "access plus 10 years"
Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT"
# CACHED FOREVER
# MOD_REWRITE TO RENAME EVERY CHANGE
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
Header unset Last-Modified
```