htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Password Protection
PostPosted: 13 Sep 2007 11:16 
Offline

Joined: 13 Sep 2007 11:05
Posts: 4
Hi,

Sorry if its in the wrong place but it wont let me post in the right forum because it says mods can only post in the security forum.

Well heres my question.

I am wanting to protect 2 folders private1 & private2 which are located in my root folder.

/root/private1/.htaccess
/root/private2/.htaccess

What I want to know is can I put the .htaccess file in the root folder so I do not have to use 2 .htaccess folders to protect both folders?

/root/.htaccess

So it protects both folders private1 and private2

I tried using <DirectoryMatch> & <Directory> but they dont seem to work.


Top
 Profile  
 
 Post subject:
PostPosted: 17 Sep 2007 23:39 
Offline
User avatar

Joined: 25 Sep 2006 04:48
Posts: 242
You could do it by setting an environment variable using rewriterule and rewritecond if /private1 or private2 are in the request_uri, but if I were you I would just do 2 .htaccess files, one in each folder.

You can only use Directory and DirectoryMatch in httpd.conf


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB