Solved

.htaccess points to  multiple files

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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now