Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Protecting my Images Folder


Guest

Recommended Posts

Posted

Basically, I would like to protect my Images folder, so that whoever tries to access it, cannot view any of my images, but are faced with a "Forbidden" message.

 

Now this is what I'm faced with:

 

When I set the permission of root.php to 644, http://**/images will show error. But when I click on any image in the home page it will work fine.

 

Warning: main(images) [function.main]: failed to open stream: No such file or directory in /home/****/public_html/root.php on line 158

 

root.php line 158

require(basename($osc_parse['path']));

 

When I set the permission of root.php to 777, http://*/images'>http://*/images will show "Forbidden" error. But when I click on any image in the home page it will not work.

 

Since I do not want to allow direct access to http://*/images'>http://*/images I can set permission of root.php to 644 and neglect the error message above, while accessing http://*/images'>http://*/images.

 

Is there perhaps another way for me to do this, bearing in mind that my primary objective is to make http://*/image inaccessible to outsiders.

 

Elroy

Posted

Several methods of keeping folders from being accessed directly are discussed at the end of this thread:

 

Click Me

 

They don't produce an error message, but they keep people out.

:thumbsup:

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 >

Archived

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

×
×
  • Create New...