Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

limiting directory access


lerningkurv

Recommended Posts

is it possible to restrict access to the osc directories so that apche has access but no one else?

ie: currently the /images directory can be listed. this bugs me for some reason.

i have tried to limit access so users cannot get a /images listing but it seems to limit apaches ability to acces the file.

hope this made sense.....any hints please ?

Link to comment
Share on other sites

Drop a little index.html file in the images folder with an error message. You can even set that up with a redirect which flips people back to your index.php if you like.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Drop a little index.html file in the images folder with an error message. You can even set that up with a redirect which flips people back to your index.php if you like.

 

 

can this be done with apache directives in httpd.conf or .htaccess ? or is that the best way ?

thanks

Link to comment
Share on other sites

can this be done with apache directives in httpd.conf or .htaccess ? or is that the best way ?

thanks

Yes but you may have to experiment a little with a .htaccess file to find the solution which blocks direct requests but does not interfere with normal use.

 

If you've got access to httpd.conf I know you can set a default which prevents directory listings but I'm not quite sure how to do it.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...