TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
View Poll Results: Do you prefer "directory browsing" on or off?
On 2 20.00%
Off 7 70.00%
Dunno 1 10.00%
Voters: 10. You may not vote on this poll

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-21-2007, 12:17 AM   #1 (permalink)
The Visitor
 
Join Date: Jul 2005
Posts: 1
Thanks: 0
dynaweb is on a distinguished road
Default [How To] Allow / Disallow Directory Browsing

Most servers are configured so that directory browsing is not allowed. This means that if a certain web directory does not contain an index (or default) file, then an error message will be displayed in the web browser.

If Directory Browsing is enabled, then the contents of the directory will be shown in the browser and you can click freely on files and folders therein.

Disllow Directory Browsing
If you want to Disallow Directory Browsing on a server that allows it, create an .htaccess file in the web root directory and add the following line:

Code:
IndexIgnore */*
Allow Directory Browsing
If you want to Allow Directory Browsing on a server that dies nto allow it by default, create an .htaccess file in the web root directory and add the following line:

Code:
Options +Indexes
Remember that .htaccess files do not work on Windows Servers, so you will have to have your web host set the configuration for you. Have fun with your server and htaccess!
dynaweb is offline  
Reply With Quote
The Following User Says Thank You to dynaweb For This Useful Post:
Brook (04-14-2009)
Old 02-21-2007, 12:17 AM   #2 (permalink)
Super ModTastic
 
mike.fro's Avatar
 
Join Date: Apr 2005
Location: Apple Valley, MN
Posts: 89
Thanks: 1
mike.fro is on a distinguished road
Default

Very nice. Thanks for your contribution.
__________________
Michael.Froseth
www.michaelfroseth.com | Personal Portfolio/Blog *DOWN*
Send a message via AIM to mike.fro Send a message via MSN to mike.fro
mike.fro is offline  
Reply With Quote
Old 02-21-2007, 10:49 AM   #3 (permalink)
The Contributor
 
Join Date: Feb 2007
Posts: 64
Thanks: 9
Killswitch is on a distinguished road
Default

Thanks, I've always just placed index pages in my directories with little messages in each. This could save me alot of time.
Killswitch is offline  
Reply With Quote
Old 02-21-2007, 08:36 PM   #4 (permalink)
Super ModTastic
 
mike.fro's Avatar
 
Join Date: Apr 2005
Location: Apple Valley, MN
Posts: 89
Thanks: 1
mike.fro is on a distinguished road
Default

Killswitch: A lot of people do that, in fact I used to do that.
__________________
Michael.Froseth
www.michaelfroseth.com | Personal Portfolio/Blog *DOWN*
Send a message via AIM to mike.fro Send a message via MSN to mike.fro
mike.fro is offline  
Reply With Quote
Old 04-14-2009, 03:00 AM   #5 (permalink)
The Visitor
 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Blake is on a distinguished road
Default

Is it possible to configure the page that the visitor sees when they try to browse a directory? I get, for the page title "Index of /(the directory)" and in the body it says "Index of /(the directory)", a server name, my site URL and a port number.

Can I change this to something else?
Blake is offline  
Reply With Quote
Old 04-14-2009, 03:49 AM   #6 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by Blake View Post
Is it possible to configure the page that the visitor sees when they try to browse a directory? I get, for the page title "Index of /(the directory)" and in the body it says "Index of /(the directory)", a server name, my site URL and a port number.

Can I change this to something else?
In IIS or Apache? In IIS it is in the configuration manager.

ps. This thread is more than 2 years old, you might have wanted to create a new one.
__________________

Village Idiot is offline  
Reply With Quote
Old 04-14-2009, 12:57 PM   #7 (permalink)
The Visitor
 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Blake is on a distinguished road
Default

I'm using Apache.

I did realize that, thanks.
Blake is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 07:56 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design