htaccess and password protection
-
I’ve just gone live with a site built with wordpress 2.7. There is a members area of the site and it needs to be password protected. I’m using permalinks. WordPress was installed in a sub-directory while I was building the site and to go live I changed the blog address in the admin so it appears that the site is in the main directory…so far so good.
While wordpress was still configured to be in the sub-directory I had password protected a members directory with a location call from the apache config in httpd.conf. This worked great and anyone attempting to go to the “members” directory (which is a virtual directory because of the permalinks) would need to input a user/pass.
Now that I’ve set wordpress to appear in the root directory, the password protection isn’t working. I’m not hosting the site and the host has decided to wash his hands of the problem so I’m stuck trying to fix it using my htaccess file…does anyone know how I might do this? My sub-directory is called newsite so the directory being protected in the httpd.conf file is newsite/members/
Interestingly enough, if I add this:
RewriteRule . /newsite/members/ [L]
above this:
RewriteRule . /index.php [L]
in the htaccess file, the whole site gets password protected…so I need to change something…any help would be greatly appreciated.
Thanks!
- The topic ‘htaccess and password protection’ is closed to new replies.