Off-topic Talk Where overpaid, underworked S2000 owners waste the worst part of their days before the drive home. This forum is for general chit chat and discussions not covered by the other off-topic forums.

Web Creation Question

Thread Tools
 
Old Jan 28, 2004 | 10:11 AM
  #1  
Jaykkub's Avatar
Thread Starter
Registered User
 
Joined: Mar 2001
Posts: 1,481
Likes: 0
From: San Diego
Default Web Creation Question

I'm in the process of creating a website, but I was wondering how do you make it so people can't access a particular folder?

Basically....

http://mysite.blah.com/content/newupdate.htm (not a real link) - The file "newupdate.htm" is kept in the directory ./content/

If someone were to just go to the directory (http://mysite.blah.com/content/) they'd see the following --

---------------------------------------------------------------------------------
Index of /content/
Name | Last Modified | Size | Description

Parent Directory

newupdate.htm | 28-Jan-2004 06:11 | 1k
---------------------------------------------------------------------------------

How do I make it so that they get a error saying they don't have access to the contents of that page? Something like this - http://www.stratics.com/content/

This is probably a newb question, but any help would be appreciated. Thanks.

- Oliver
Reply
Old Jan 28, 2004 | 10:23 AM
  #2  
magician's Avatar
Registered User
 
Joined: Jul 2001
Posts: 6,592
Likes: 0
From: Yorba Linda, CA
Default

I know that you can require a password for a folder, but I don't know how to implement it. I can pass this along to my friend who builds websites professionally, if you like.
Reply
Old Jan 28, 2004 | 10:27 AM
  #3  
Chadwick's Avatar
Registered User
 
Joined: Sep 2003
Posts: 1,892
Likes: 0
From: Tiffin, Ohio
Default

Do a search for information on creating a .htaccess and a .htpasswd file on your webserver.

I don't remember how to do it off the top of my head, but I believe the password has to be encrypted before it's put into the password file.
Reply
Old Jan 28, 2004 | 11:06 AM
  #4  
thunderchicken's Avatar
Registered User
 
Joined: Mar 2002
Posts: 1,457
Likes: 0
From: Zionsville
Default

You can do this with a webscript depending on what technology you're using.

You can do this pretty easily in IIS, or if you're not hosting this, there's usually a control panel that allows you to set specific permissions on files/folders.
Reply
Old Jan 28, 2004 | 11:13 AM
  #5  
yobri's Avatar
Registered User
 
Joined: Dec 2003
Posts: 723
Likes: 0
From: SF Bay Area
Default

Pretty easy.

For MS-based servers, make the default file "default.html" or whatever extension you are using.

For UNIX-based server, make the default file "index.html" or whatever extention your are using.

This will make it so that your directories are not browsable, but if a user knows the exact name of the another file in that directory, they would have to explicitly type in the file name in order to access it. The default files make it so that no one can casually browse your directory files from a standard HTTP protocol.
Reply
Old Jan 28, 2004 | 11:16 AM
  #6  
Chadwick's Avatar
Registered User
 
Joined: Sep 2003
Posts: 1,892
Likes: 0
From: Tiffin, Ohio
Default

^ that would work too
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
ironwedge
Off-topic Talk
1
Oct 13, 2003 10:05 PM
ironwedge
Off-topic Talk
10
Aug 5, 2003 09:10 AM
ironwedge
Off-topic Talk
2
Jul 8, 2002 07:01 AM




All times are GMT -8. The time now is 11:56 PM.