Link to home
Start Free TrialLog in
Avatar of mstone
mstone

asked on

.htaccess points to multiple files


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  
Avatar of samri
samri
Flag of Malaysia image

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.
ASKER CERTIFIED SOLUTION
Avatar of samri
samri
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Mike,

are you still waiting for a solution?

Avatar of periwinkle
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