Solved

.htaccess points to  multiple files

Posted on 2002-05-17
6
234 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 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