Results 1 to 5 of 5
-
16th Feb 2010, 04:31 AM #1OPMember
password protect a single file ?
I want to make a text file (located under /home/public_html) to be viewable through a browser by me only.
One way is to make it password protected, I know how to do this through cpanel for a directory but I don't know how to do it for a single file, also I don't want to move the file in to a private directory because the file already been used in many places ?
any idea ?Tigger Reviewed by Tigger on . password protect a single file ? I want to make a text file (located under /home/public_html) to be viewable through a browser by me only. One way is to make it password protected, I know how to do this through cpanel for a directory but I don't know how to do it for a single file, also I don't want to move the file in to a private directory because the file already been used in many places ? any idea ? Rating: 5
-
16th Feb 2010, 05:11 AM #2MemberWebsite's:
felonygames.com- Open a new text file called .htpasswdNote the period at the beginning of the filename
- Use a password encryption program to create your passwords. Paste the lines into your .htpasswd file and save the file. You will have one line for every username that requires access
- Upload the .htpasswd file to a directory on your Web server that is not live on the Web. In other words, you should not be able to go to http://YOUR_URL/.htpasswd - it should be in a home directory or other location that is secure.
- Then you need to create your HTaccess file for the file you want to protect. Open a text file called .htaccess
- Add the following to the file: AuthUserFile /path/to/htpasswd/file/.htpasswd
AuthName "Name of Page"
AuthType Basic
<Files "mypage.html">
require valid-user
</Files> - Change /path/to/htpasswd/file/.htpasswdto the full path to the .htpasswd file you uploaded in step 3.
- Change "Name of Page"to the name of the page being protected.
- Change "mypage.html"to the filename of the page you're protecting.
- Save the file and upload it to the directory of the file you want protected.
- Test that the password works by accessing the URL. If your password doesn't work, go back to the encryption programs and encrypt it again, remember that the username and password will be case-sensitive. If you are not prompted for a password, contact your system administrator to make sure that HTAccess is turned on for your site.
Source
http://webdesign.about.com/od/security/a/aa020801c.htm
- Open a new text file called
-
16th Feb 2010, 08:59 AM #3OPMember
Thank you for the info,
I will follow the instructions then.
-
16th Feb 2010, 05:14 PM #4Member
Thanks for the info bmoeller.
Trusted buyers: warezfreak09, aishamontreal, gamelord, gruby4678, sharesz, ancient, wCruiser, madsnipper.
-
16th Feb 2010, 05:28 PM #5MemberWebsite's:
felonygames.comNot a probelm
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How to password protect a folder in cPanel
By Areon in forum Server ManagementReplies: 0Last Post: 1st Mar 2014, 04:04 PM -
LinksSafe.com, Protect your links from being indexed using redirection, password
By margerator in forum File Host DiscussionReplies: 12Last Post: 20th Dec 2011, 01:24 AM -
Help me in joining MPG files into a single MKV file
By Froomple in forum Technical Help Desk SupportReplies: 6Last Post: 6th Oct 2011, 07:59 PM -
Need Password Protect Program
By cotufa-ssdd in forum Technical Help Desk SupportReplies: 4Last Post: 17th Sep 2011, 05:02 AM -
Password Protect Directories
By FancyPants in forum phpBBReplies: 6Last Post: 25th Jan 2010, 12:26 AM
themaCreator - create posts from...
Version 3.08 released. Open older version (or...