Forum Moderators: phranque

Message Too Old, No Replies

htaccess problem

htaccess problem, 2 htpassword files

         

miranda2004

2:10 am on Mar 12, 2004 (gmt 0)

10+ Year Member



Hi all,

I have a question. I have 2 password protected site on 1 server.

Both have seperate htpasswords on them because one is should be tracked seperate. I can not use just one single htpassword file.

What I want to have is for my htaccess file to check both htpassword files.

So people who have subscribed to the other site, will also gain access to the other with the same password.

Below is what I got now. Could anybody modify this so I can use it? I appreciate all help!

Kind Regards,
Miranda

My htaccess file I have now:
AuthUserFile /home/virtual/site1/fst/var/www/cgi-bin/Tr5uqAfMtUm7EasiZzNnHVWDgv2ByQkx/password/.htpasswd
AuthGroupFile /dev/null
AuthName "Information Area"
AuthType Basic
Satisfy Any

<Limit GET POST>
order deny,allow
deny from all
require valid-user
</Limit>

I need to add this password file:
/home/virtual/site1/fst/var/www/cgi-bin/Tr5uqAfMtUm7EasiZzNnHVWDgv2ByQkx/password/.htpasswd

Birdman

3:19 pm on Mar 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Seems to me you should have two .htaccess files. One for each site. Then when you add a user to site a, you can add them to site b if you wish.

miranda2004

10:47 pm on Mar 14, 2004 (gmt 0)

10+ Year Member



Hi, thank you for your answer.
But does a browser check 2 htaccess files?

So if I understand correctly I should upload 2 htaccess files in 1 directory, each checking another password file?

Kind Regards,
Miranda

Birdman

11:05 pm on Mar 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello again,

You said:

I have 2 password protected site on 1 server.

...So people who have subscribed to the other site, will also gain access to the other with the same password.

I'm assuming there are two(2) websites, so there should be two(2) public root directories in which you can place .htaccess files.

Sorry if I'm not understanding what you are looking for, but we can definately get it straight with some more information.

miranda2004

5:49 pm on Mar 16, 2004 (gmt 0)

10+ Year Member



Hi Birdman!

Thanks for responding again.

What I need in short:
I have to websites. Both have a subscribe area and a members section.

What I want is that a subscriber to website A also get access to website B without having to subscribe also at website B.

Because the other website is totally seperate from mine, we can not have 1 htpasswrd file.

So I need a way for htaccess to check 2 htpasswrd files.
One at website A and one at website B.
Both websites are hosted on the same server.

I hope this makes sense to you.

Kind Regards,
Miranda