ic3d
07-26-2006, 07:43 PM
Hi everyone,
I have a problem when password protecting a folder of a website using .htaccess. I use wordpress on a free-time site and everything works great. However Wordpress comes with an htaccess file in the root that makes it impossible to use htcaccess in a folder outside.
This is the exact htaccess file generated by Wordpress located in the root:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
What i want to work is that
url/restrictedarea/ can use a htaccess password file. It can't now because then i get a 404 not found error.
This is what the htaccess in the folder /restricedarea/ looks like:
#BEGIN RestrictedArea
AuthName "Content Editor Protected Area"
AuthType Basic
AuthUserFile /path/restrictedarea/.htpasswd
Require valid-user
#END RestrictedArea
Path is ofcoarse the correct serverpath to the htpasswd file that is located within the same folder.
Could someone help me out with this issue. I have basicaly no knowledge of htaccess.
I have a problem when password protecting a folder of a website using .htaccess. I use wordpress on a free-time site and everything works great. However Wordpress comes with an htaccess file in the root that makes it impossible to use htcaccess in a folder outside.
This is the exact htaccess file generated by Wordpress located in the root:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
What i want to work is that
url/restrictedarea/ can use a htaccess password file. It can't now because then i get a 404 not found error.
This is what the htaccess in the folder /restricedarea/ looks like:
#BEGIN RestrictedArea
AuthName "Content Editor Protected Area"
AuthType Basic
AuthUserFile /path/restrictedarea/.htpasswd
Require valid-user
#END RestrictedArea
Path is ofcoarse the correct serverpath to the htpasswd file that is located within the same folder.
Could someone help me out with this issue. I have basicaly no knowledge of htaccess.
