I'm not sure where to ask this, if this is the wrong place let me know.

I have password protect a dir on my website(the admin dir) but when I put the user and password in it takes me into that dir. Is there anyway i can make it open a specific file from that dir(admin.php)

my htaccess file

AuthType Basic  
AuthName "Admin Login"  
AuthUserFile C:/wamp/www/diamondback/admin/.htpasswd  
require valid-user

my htpasswd file

user:password

Thanks for looking...............

Recommended Answers

You can (re)set the default file for that folder. It's usually index.php, so you could also upload a file named that, and do a header redirect in code.

Jump to Post

All 2 Replies

You can (re)set the default file for that folder. It's usually index.php, so you could also upload a file named that, and do a header redirect in code.

Brilliant! Thanks very much................

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.