Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

.htaccess

.htaccess is a file stored in a directory, commonly on a Unix / Linux variant Operating System, that grants or denies users or groups access rights to that directory. When this file is in a directory and setup, the user will be prompted for a username and password when attempting to access the directory. This is also how web pages have password prompts on them.  

On a Unix / Linux system this file should have the permissions set to 640 using chmod and look similar to the below example.

AuthUserFile /home/directory/.passfile
AuthGroupFile /dev/null
AuthName Access For Valid Users
AuthType Basic

<Limit GET>
require valid-user
</Limit >

The AuthUserFile is the file that contains your users and passwords that you wish to grant access to the directory where the files are stored.

To create a passfile enter the below command at the prompt. 

htpasswd -c . passfile username

After entering the above command you will be prompted to enter the password for the username.

The passfile should also be set to 640 permissions. 

It is important to note that the above examples and information may not apply to all types of systems or setups. Therefore, if you are unsure if your Internet Service Provider supports the creations of rights using htaccess, it is recommend you contact them if you are unable to set password protection on your web site. 

Also see: .htpasswd

 

Index

Category:
Dictionary

Related Pages:
# - Definitions

 

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope