How can we able to protect a site using USERNAME and PASSWORD after we entering the URL and the site is before loading
For ex: http://www.buildyourownbouquet.com/
I need exactly what it 开发者_JS百科looks like...
Thanks in Advance
Fero
It's called HTTP authentication. If you're using Apache, you can read about it in the docs.
Here's an htaccess generator for you, simple enter the details, download htaccess and place it in the directory you want to protect:
http://www.htaccesstools.com/htaccess-authentication/
This is called a HTTP AUTH. And is described in this tutorial
php has a mechanism for this. see example #2 on this page of the manual.
Or, as x2 pointed out, you could use htaccess. I assume you are using apache. Check here.
It can be done with htaccess file.
精彩评论