Solved

.htaccess points to  multiple files

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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 …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 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