1.

Solve : How do I completely protect my site via HTACCESS??

Answer»

My current HTACCESS file looks like this

Code: [Select]RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://www.mywebsite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mywebsite.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mywebsite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mywebsite.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

I would like to make it so that the entire website is password protected. How would I do that?


Zylstra...

Depending on your host...

If you have a Control Panel you can log into...supplied by your host...you may be able to log into it and look for a link to password protect your directories.

I use cPanel X...supplied by my host. I have a link as I specified before...and I can select the root DIRECTORY, public_html, and password protect it. If anyone wants access to the site...they'll need the password.

Hope this helped.I'll check it out, I dont think I can protect the /public_html/ using my cPanel VERSION 11 (newest version) but I will try

Changing my mind, I am using cPanel X 10.9.0-RELEASE 7965

I cannot access my root directory using my pay-for hosting service, but I have a free one that has cPanel 11, which does allow me to, meaning that I have to do it manually...
How would I go about doing this, and which folder do I place it in? Zylstra...

Yes, you can password protect your public_html directory.

Log into CPanel...navigate to Password Protect Directories.

Look for the public_html folder...you'll see a "/" without the quotes next to it. Click it. You'll be able to configure the password protection on the page that comes up.

Hope you found that useful.!!
My TIMELINE:


Thanks "The Saviour"!
I think this will solve my problems! You're welcome, Zylstra.Okay, its working great! Thanks

One quick question:
Is it possible to unprotect a sub directory?
Like, the /public_html/ is protected, but I want
/public_html/imageshare/files/ to be unprotected. Is this possible? Not positive, but I think once you pw protect the root, you won't be able to access a sub directory.

Something you might want to talk to your host about.



Discussion

No Comment Found