Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I stop the folder contents being viewed?


gold682

Recommended Posts

Hi,

 

Have tried searching these forums in answer to this question, but to no avail.

 

Basically I want to stop the viewing/listing of any directories/folders of my web-site (eg. can currently view/list contents of www.mysite.com/catalog/images).

 

This can be done with any folder/directory, so long as you know the path name (except my admin folder which is protected by .htaccess!!)

 

Any help gratefully appreciated.

 

Thanks in advance....

 

Paul

Link to comment
Share on other sites

Simply put a blank index.html file in each folder.

 

You could get fancy and make a "Directory listing not allowed" page.

 

Many hosting control panels have a function to restrict directory listing, also.

Link to comment
Share on other sites

Simply put a blank index.html file in each folder.

 

You could get fancy and make a "Directory listing not allowed" page.

 

Many hosting control panels have a function to restrict directory listing, also.

 

Cool, knew there would be an easy way. Have checked out my hosts control panel but nothing obvious there. The blank index is a neat easy solution.....Thanks!

Link to comment
Share on other sites

you can use an .htaccess file

 

place the following line in it:

 

IndexIgnore *

 

all they get is a blank page

 

if you are trying to prevent people from hotlinking lots of things can be done

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...