Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do not want htaccess to affect subdirectory

Status
Not open for further replies.

proggybilly

Programmer
Apr 30, 2008
110
US
I have a site where the main page is protected by an .htaccess file so that I can allow only certain people to access the main site. It is a list of wedding guests and I do not want just anyone to change it. However, I installed phpBB in a subdirectory and when I go to the forum it asks for the username/password to the main site, as obviously it should. I would like it to not do that. When I go to the forum I do not want the .htaccess to affect.

Code:
AuthType Basic
AuthName "Password Required"
AuthUserFile /etc/htpasswd/htpasswd
Require valid-user
 
I'm not sure what your issue is because phpbb has it's own username and password database. It also comes with it's own .htaccess which restricts certain types of mischief. An htaccess file will control access to the directory it is in an all its sub-directories. You can put your main site's files in a sub-directory off the root as well as your forums diectory. Now the root directory will contain 2 subs which are /main and /forums for example. You can put a page in your root dir with links to both or you can use an htaccess file with a redirect in it to send users to the default directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top