Sales Hotline: 0845 026 0238
Customer Support: 0871 230 9311
Product Details
Broadband
Broadband Hardware
SDSL Broadband
Domain Names
Webhosting
Email
Dial-up Access
WiFi Hotspots
Security
Switching to f2s?
Refer a Friend
Newsgroup access
Information
Major Accounts
About Us
Press Releases
Case Studies
Contact Us
Help and FAQ's
Online tutorials
Service Status
Search f2s
Go
F2s awards
Using .htaccess
How to password protect a webpage or directory using .htaccess.
Technical Support Homepage

Step 1: The first thing you need to do is to create a file called .htpasswd using notepad. Notice the fullstop at the beginning. In this file, we'll place an actual ID (test) and a password. To increase security, the passwords in .htpasswd need to be in encrypted form.

To create your encrpyted password click here.

Now type your user name followed by a : and your encrypted password into the .htpasswd file. Now save the file and upload it to your website.

Step 2: Now you need to create a file called .htaccess file in notepad which will be uploaded to the directory you want to protect.

Copy and paste the following into your file:


AuthUserFile /web/sites/133/accountname/www.subdomainname.f2s.com/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic

<Limit GET>

require user test

</Limit>

In the first row edit the path to your .htpasswd file (this will be found in your members area under the website section by clicking on the "view details" link) note: you must include the file name (.htpasswd)

On the second from last line edit the user name.. For additional users add their names underneath each other ie:
<Limit GET>

require user test
require user john
require user pete

</Limit>


You must also add new users to your .htpasswd file including their encrypted password.
Technical Support Homepage
© Copyright Tiscali UK Limited, its affiliates and licensors.
Freedom2surf is a trading name of Pipex Internet Limited, a Tiscali UK Company.
Terms of use. Privacy policy.