Forum Moderators: phranque

Message Too Old, No Replies

htaccess

         

dritoni

12:58 pm on Mar 3, 2006 (gmt 0)

10+ Year Member



Greetings,

I have a couple of directories where users have access by supplying their username and passwords (via apache .htaccess) e.g when someone goes to [website...] the user/pass box appears and he gains access by supplying the correct username password. I wonder if there is a way for them by going directly to the root e.g. [website...] enter the user/pass and get to the appropriate folder. Has anyone done anything similiar.

extras

5:42 pm on Mar 3, 2006 (gmt 0)

10+ Year Member



You can simply redirect to the folder, I guess.

RedirectMatch ^/$ /folder/

Some people do things like this:
RewriteEngine On
RewriteBae /
RewriteCond %{REMOTE_USER} ^(.*)$
RewritRules ^(.*)$ %1/$1 [L]

Or this
RewriteEngine On
RewriteCond %{REMOTE_USER} ^(.*)$
RewritRules ^(.*)$ [%{HTP_HOST}...] [L,R]

If you don't understand what it means, probably you shouldn't bother using them, though.

It's better to keep your site simple, in general, IMO.
A bit of fancy feature may cause lots of headache in future.

dritoni

5:26 pm on Mar 4, 2006 (gmt 0)

10+ Year Member



Actuall i don`t I`ll look on the apache manual if I can get any info about it. Thanks a lot.