Forum Moderators: phranque
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.
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.