Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Protecting Images Folder


nvbenterprises

Recommended Posts

I was wondering if anyone knew of any problems associated with adding an htaccess file to the images folder. I've checked the header status and the image link pop ups are 200 ok after the file was added. I am just trying to deny viewing the images/ directory folder for customers. I searched to see if there is a better way, but could not find any previous posts. Much appreciated. Nic

Link to comment
Share on other sites

This works:

 

Copy the text in the CODE box below:

 

<?php
header ("Location: http://www.yoursite.com/catalog/index.php");
?>

Edit this part of the code:

 

www.yoursite.com/catalog/index.php

Change that to the URL of the page you want people "snooping" in your images folder to get redirected to.

 

Save it as index.php & upload it to your images folder.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...