Post by HATEPOLICY » Thu Aug 30, 2012 11:54 pm

Just wondering if I can grant/deny access with .htaccess to my downloads folder in OC?
I also have a little script which enables folder listing for the folder it resides in,

Will this conflict with OC in anyway?

Many thanks!

Skills: Ripp, copy, paste.


New member

Posts

Joined
Tue Nov 22, 2011 5:46 pm
Location - Boosting 30-80hz ranges.

Post by Avvici » Fri Aug 31, 2012 11:46 am

That seems like a lot of work to me.
If its just to stop the user viewing the directory root you could just place an index.php page in there that has some html on it that says "NO ACCESS" or "ACCESS DENIED" Most of the open cart folders already have this.

Or in your htaccess...
Code:

Code: Select all

RewriteRule ^uploads/$ /error.php
Customize the error.php page to read something like "YOU ARE HERE BECAUSE YOU HAVE TRIED TO ACCESS A FOLDER THAT IS NOT ACCESIBLE".

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by HATEPOLICY » Sat Sep 01, 2012 12:05 am

Thanks very much for your reply!
Just to make sure and be totally clear, perhaps my 1st post was not, coupled with the fact that I am a noob.

The downloads folder in our case is full of WAV and MP3,
We want our artists/DJs to be able to download from there, folder listing is disabled for the entire site,
Hence the little script to enable it only for there and then grant access with a password thru htaccess only for them,
While still using the downloads folder for active sales,

Any issues with this? :)

Many thanks again!

Skills: Ripp, copy, paste.


New member

Posts

Joined
Tue Nov 22, 2011 5:46 pm
Location - Boosting 30-80hz ranges.

Post by Avvici » Sat Sep 01, 2012 3:48 am

Just stick an index file in there like I suggested. That way you can't get to the root of the folder and see ALL downloads. Reference each download privately via URL to the customer.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC
Who is online

Users browsing this forum: No registered users and 351 guests