Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Web Hosting Services

Notices

Reply
 
Thread Tools
  #1  
Old 07-14-2009, 05:09 PM
expodiva expodiva is offline
Hatchling Croc
 
Join Date: Aug 2008
Posts: 6
Red face Password protecting pages

I have a site that has some general information I'm content with sharing but would like to password protect certain pages. How do I go about doing that?

Thanks!
Reply With Quote
  #2  
Old 07-14-2009, 05:21 PM
expodiva expodiva is offline
Hatchling Croc
 
Join Date: Aug 2008
Posts: 6
Default Re: Password protecting pages

Update/clarification of question: I went into Cpanel and found the password protect function, but it shows folders and I want to password protect something in a folder, not the entire folder. How do I go about that. I'm new at this, and leave my larger sites to the pros, but would like to be able to manage this one on my own. Any help will be appreciated.
Reply With Quote
  #3  
Old 07-14-2009, 05:25 PM
Pazeh Pazeh is offline
King Croc
 
Join Date: Jan 2005
Posts: 1,327
Default Re: Password protecting pages

you need to implement a user login / password script on those files.
Reply With Quote
  #4  
Old 07-14-2009, 05:29 PM
regentronique's Avatar
regentronique regentronique is offline
King Croc
 
Join Date: Aug 2007
Location: Quebec,Canada
Posts: 969
Default Re: Password protecting pages

I think it could be easier, for a newbie, to just move the protected content into a separated directory and simply use cPanel for it.
Reply With Quote
  #5  
Old 07-14-2009, 05:29 PM
expodiva expodiva is offline
Hatchling Croc
 
Join Date: Aug 2008
Posts: 6
Default Re: Password protecting pages

Thanks for your reply.
Are there directions somewhere to do that?
Reply With Quote
  #6  
Old 07-14-2009, 05:36 PM
GvilleRick's Avatar
GvilleRick GvilleRick is offline
Emperor Croc
 
Join Date: Jan 2007
Location: Greenville, SC
Posts: 3,130
Default Re: Password protecting pages

To password protect a particular page you would need to use a script to require the password and include it in the page you want to protect. You can do that using PHP pages and a Google search on 'password protect page' will turn up some examples including this one.

As Regentronique said, it would be easiest to put the pages you want to protect in a particular folder and protect it in your cPanel but there are options. I have done similar things for pages on another server using ASP but PHP would be similar.
Reply With Quote
  #7  
Old 07-14-2009, 07:04 PM
expodiva expodiva is offline
Hatchling Croc
 
Join Date: Aug 2008
Posts: 6
Default Re: Password protecting pages

I thank each of you for your help. I think creating another folder is the best option for me. I'm using Dreamweaver. Do I just creat another folder there with the pages I want to protect and then upload it? Or is there more to it than that?
Reply With Quote
  #8  
Old 07-14-2009, 07:06 PM
GvilleRick's Avatar
GvilleRick GvilleRick is offline
Emperor Croc
 
Join Date: Jan 2007
Location: Greenville, SC
Posts: 3,130
Default Re: Password protecting pages

Yes, just create the folder and put the files you want to protect in it. Then go into your cPanel and use the folder protect option to create a username and password that others can use to access the files in the folder.
Reply With Quote
  #9  
Old 07-14-2009, 07:08 PM
expodiva expodiva is offline
Hatchling Croc
 
Join Date: Aug 2008
Posts: 6
Default Re: Password protecting pages

Yeaa! I'll try it tonight. Thanks!
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Password Protect Directories" Bug on HTTPS/SSL Pages after PHP5+MySQL5 Upgrades BiL Shared Hosting Support 3 06-24-2008 07:41 PM
Protecting FTP directories? SWB Shared Hosting Support 5 04-14-2008 04:02 PM
Password protecting only one page on a site unclebuck13 Shared Hosting Support 4 01-16-2008 07:04 PM
Password protecting a data base? Tanstafl Webhosting 1 03-08-2006 08:15 PM

All times are GMT -5. The time now is 09:33 PM.