Solved

.htaccess points to  multiple files

Posted on 2002-05-17
6
247 Views
Last Modified: 2010-03-04

John Michael Soileau of realtimescripts.com says in a comment that :

"sometimes you can simply have your .htaccess file point to each(a multiple of) .htpasswd file.

I have tried various ways.

Anyone know the correct syntax for this

Mike  
0
Comment
Question by:mstone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 15

Expert Comment

by:samri
ID: 7016973
I have tried the following on my Apache (1.3.24 on Win2k), and it works fine, and I belive it should not be much different on Unix platform.

My config.

--httpd.conf
    <Directory "C:/Program Files/Apache Group/Apache/htdocs/test">
        AllowOverride AuthConfig
        Order allow,deny
        Allow from all
    </Directory>
-------------
--.htaccess
AuthType Basic
AuthName " "
AuthUserFile "c:\program files\apache group\apache\htdocs\test\.htpasswd"
AuthUserFile "c:\program files\apache group\apache\htdocs\test\.htpasswd1"
AuthAuthoritative     on
Require valid-user
--------------------

Please, if it still does not work, look at the error_log (or error.log on Windows Apache).  You might get some hint there.  Or you can post it here, and we might be able to help.

cheers.
0
 
LVL 15

Accepted Solution

by:
samri earned 100 total points
ID: 7019864
Apology,

it seems that the 2nd AuthUserFile (or maybe the last in the list) will be used.  Duh!.

0
 
LVL 15

Expert Comment

by:samri
ID: 7020730
mstone,

Could you post the link where John Michael points that statement out.

I doesn't seems to be able to figure out on how to use multiple .htaccess file anyway.  I knew you can have different .htaccess (which each one of them are using different refer to a different userfile), but not one .htaccess using multiple userfile.
0
 
LVL 15

Expert Comment

by:samri
ID: 7075924
Mike,

are you still waiting for a solution?

0
 
LVL 15

Expert Comment

by:periwinkle
ID: 9682156
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area with the following recommendation for this question:

Answered by samri

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

periwinkle
EE Cleanup Volunteer
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question