Page 1 of 1

Admin folder Validation

Posted: Mon Nov 12, 2007 6:18 am
by phpcoder
Hi,

I got a admin folder on my website. I want to put security on that folder so when ever some one try to acces that folder :

http://www.myweb.com/admin

Then it should come up with dialog boz asking for user name and password. Please let me know how to do it. My web server is linux fedora.

Thanks

Posted: Mon Nov 12, 2007 6:45 am
by Josh1billion
I'm not sure how you'd go about it with your setup, but my webhost (like many webhosts) uses CPanel which has a menu item called "Password-Protect Directories." If you have CPanel, you can go there and password protect them from there.

Posted: Mon Nov 12, 2007 7:02 am
by phpcoder
Josh1billion wrote:I'm not sure how you'd go about it with your setup, but my webhost (like many webhosts) uses CPanel which has a menu item called "Password-Protect Directories." If you have CPanel, you can go there and password protect them from there.
I have not got any gui interface to my webserver I need to setup everythig manually in text mode.

Posted: Mon Nov 12, 2007 12:12 pm
by feyd
PHP can return Basic HTTP Authentication headers which will request a username and password (like you are asking about). Look in the documentation for header().