Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Simple question about directory protection
Old 01-08-2008, 01:08 AM Simple question about directory protection
xanadu's Avatar
Skilled Talker

Posts: 84
Location: Swarthmore, PA
Trades: 0
Hi all
Relatively simple question here. Is there any way I can protect a directory from prying eyes by visiting the directory directly (like www.mysite.com/files) while still maintaining functionality for all other things that refer to files within that directory via HTML or PHP?

I know it has to be some .htaccess thing...

Gracias
__________________
Time to Kill. Games to Play.
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
xanadu is offline
Reply With Quote
View Public Profile Visit xanadu's homepage!
 
 
Register now for full access!
Old 01-08-2008, 01:23 AM Re: Simple question about directory protection
jdfreelance's Avatar
Skilled Talker

Posts: 88
Name: Joseph Dickinson
Trades: 0
You're right, .htaccess will do this. Google "protect directory .htaccess" .

Good luck
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
// PHP/MYSQL/XHTML/CSS/FLASH/JAVASCRIPT/VBSCRIPT
jdfreelance is offline
Reply With Quote
View Public Profile
 
Old 01-08-2008, 02:00 AM Re: Simple question about directory protection
Moxxnixx's Avatar
King Spam Talker

Posts: 1,174
Name: Lance
Location: Virginia Beach
Trades: 0
Alternatively, you can just throw a blank index.html into the directory.
__________________
Get your facts first, and then you can distort them as much as you please. - Mark Twain

Please login or register to view this content. Registration is FREE
---

Please login or register to view this content. Registration is FREE

All My Sites Are Proudly Hosted @
Please login or register to view this content. Registration is FREE

Moxxnixx is offline
Reply With Quote
View Public Profile Visit Moxxnixx's homepage!
 
Old 01-08-2008, 02:38 AM Re: Simple question about directory protection
Skilled Talker

Posts: 71
Name: foong
Trades: 0
To add a little to the .htaccess solution...

In order to disable a folder from listing it's content on browser, simply create a .htaccess file in the folder and
place in the following code :-

Options -Indexes

This instruct webserver to disable the directory listing if there is no default index file (i.e. index.htm, index.html etc.) present in the folder.
__________________
Foong
Over 100
Please login or register to view this content. Registration is FREE
for download
Dotservant.com professional
Please login or register to view this content. Registration is FREE
since 2000
dotservant.com is offline
Reply With Quote
View Public Profile Visit dotservant.com's homepage!
 
Old 01-08-2008, 10:41 AM Re: Simple question about directory protection
xanadu's Avatar
Skilled Talker

Posts: 84
Location: Swarthmore, PA
Trades: 0
Quote:
Originally Posted by Moxxnixx View Post
Alternatively, you can just throw a blank index.html into the directory.

Wow. It's so surprising how you can forget the most simplest of things. Thanks a ton everyone!
__________________
Time to Kill. Games to Play.
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
xanadu is offline
Reply With Quote
View Public Profile Visit xanadu's homepage!
 
Reply     « Reply to Simple question about directory protection
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.49975 seconds with 12 queries