Forum Moderators: phranque

Message Too Old, No Replies

Customizing login window using htaccess

         

Bluestreak

12:48 am on May 31, 2002 (gmt 0)

10+ Year Member



Hi all,

I'd like to know if it's possible to customize the popup window that results when you click on a directory that is password protected by htaccess. Is there anyway to add text or other info so the user has some idea on how to proceed (presuming he doesnt have a login or password)

If not, is it possible to customize the error page if the user failed to login? instead of getting a 403 error as a result of canceling or not logging in, I'd like that replaced with a short description on what a user needs to do if he wants proper access to the retricted directory.

Appreciate any advice :D

oilman

4:26 pm on May 31, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey Bluestreak - welcome to WebmasterWorld.

I'd recommend using some kind of script to manage customization of a password protected area and any error messages that go along with them.

Take a look at Hotscripts Password Protection Section [hotscripts.com]

Bluestreak

8:23 pm on May 31, 2002 (gmt 0)

10+ Year Member



Thanks for the suggestion.

It looks like it wont be too hard to set it up using a script. But I have another question regarding password protection that might be more difficult to implement. Is it possible to use htaccess to password protect individual files instead of directories? I have two files I want to protect on my site (they cant be moved since they work in correlation with other files that depend on its current location). I want to be able to protect them using htaccess, because htaccess provides excellent security. Where can i find more info on this? I know Apache seems to have a featuire that allows protection of files, but site admin says he cant do it. I can customize and access htaccess though. Is there a workaround available?

Any help appreciated!