Jump to content

Recommended Posts

Posted

Hi, a very nice scripts.

Thanks for providing it, I'll need it and try not to use the password protect directory available in Cpanel :-p

Posted
  JcX said:
Hi, a very nice scripts.

Thanks for providing it, I'll need it and try not to use the password protect directory available in Cpanel :-p

 

The password protection just gives you another option besides making a directory password protected. But if your going to use .htaccess anyway, here's a neat little trick that will keep you from typing in your password each time. After you've set up password protection on a directory, go back and configure your .htaccess file like this:

 

AuthName "Restricted Access"
AuthUserFile "/home/user/.htpasswds/public_html/directory/passwd"
AuthType Basic
Require valid-user
Order allow,deny
Allow from 100.200.300.195
Satisfy any

 

Just replace 100.200.300.195 with your ip and your ip doesn't have to enter the password, but all others do. This way if your on another pc, you can still access your files with a password.

 

Or simply not have a password at all and only allow your ip access:

 

order deny,allow
deny from all
allow from
100.200.300.195

 

 

Posted
  TroJan-x said:
used for .... which code

 

Those .htaccess codes DO NOT have to be used in conjunction with the password script that I posted. I was just giving a couple of examples of what you could do with .htaccess if you were going to use it anyway.

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...