tags:

views:

84

answers:

5

Hi all

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 looks like...

Thanks in Advance

Fero

A: 

It can be done with htaccess file.

x2
would you please explain how ?
Fero
One of the other links pointed out will be able to tell you.
James Deville
+5  A: 

It's called HTTP authentication. If you're using Apache, you can read about it in the docs.

Reinis I.
+2  A: 

This is called a HTTP AUTH. And is described in this tutorial

Ólafur Waage
+1  A: 

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.

klez
+3  A: 

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/

Nimbuz