Results 1 to 9 of 9
  1. #1
    Join Date
    May 2011
    Posts
    49
    Plugin Contributions
    0

    Default My .htaccess files are restricting access to my images

    What do the .htaccess files do and why do I need them?

    I have found what the problem was with loading the open source templates on my Zen Cart, and also trying to load a custom template.

    I took people's advice and went to my host provider. After much to'ing and fro'ing, they came up with this solution:-

    >>It looks like the .htaccess files are restricting access to the images, I have renamed the files in the /includes and /templates directory to .bak-htaccess for now, and this appears to let the images load, for example:: http://www.ellybooks.co.uk/shop/incl...te_default.jpg now loads fine in the browser.<<

    Now that these files are, effectively inactive, it may cause problems down the line I am not aware of. Any thoughts?

    The previous issues I was having are detailed on yesterday's "adding a logo/header" thread

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: My .htaccess files are restricting access to my images

    The .htaccess files provided with Zen Cart will not prevent access to common image files if you're using contemporary versions of Apache/PHP. If you're using some other webserver engine that's not capable of handling the advanced security protections offered by the supplied .htaccess files, then you'll need to delete/rename those .htaccess files and work with your hosting company to come up with another way to handle the security protections based on your server's unique configuration/requirements. Until you do that, you leave your site open to risk of abuse.

    Also note that if you used your hosting control panel to enable a "hotlink protection" feature, that might have added something to your .htaccess files which broke the image handling you've mentioned. That's up to you and your hosting company to sort out, and is not a Zen Cart issue.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2011
    Posts
    49
    Plugin Contributions
    0

    Default Re: My .htaccess files are restricting access to my images

    Thanks Dr Byte, I'll go back to them again.

  4. #4
    Join Date
    May 2011
    Posts
    49
    Plugin Contributions
    0

    Default Re: My .htaccess files are restricting access to my images

    This is what my host said:-

    >> I have narrowed the issue down to the security in the /public_html/shop/includes/templates/.htaccess file, however I have been unable to get this to work within the current server environment, the server does run Apache and its capable of running these .htaccess. We can assist to a certain degree, but we cannot offer support on third party scripting installations im afraid. <<

    Now I am totally stuck.

    And totally miserable.

  5. #5
    Join Date
    May 2011
    Posts
    49
    Plugin Contributions
    0

    Default Re: My .htaccess files are restricting access to my images

    I have decided to try another shopping cart in the hope it won't clash with my webhost.

    This is not a reflection on Zen Cart, which I think is a great piece of software, but on my **** host. If I hadn't just paid for a year's hosting with them - and if I expected to make more than pin money on my site - I would be dropping them and paying to go somewhere else.

    Thank you for the support of the people on these forums. You've been really helpful and generous in giving your time.

  6. #6
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: My .htaccess files are restricting access to my images

    /public_html/shop/includes/templates/.htaccess file << this file your problem

    There is no such file in a default Zen Cart. Not sure where that particular '.htaccess' file came from but you are safe to delete it.

  7. #7
    Join Date
    May 2011
    Posts
    49
    Plugin Contributions
    0

    Default Re: My .htaccess files are restricting access to my images

    Quote Originally Posted by Website Rob View Post
    /public_html/shop/includes/templates/.htaccess file << this file your problem

    There is no such file in a default Zen Cart. Not sure where that particular '.htaccess' file came from but you are safe to delete it.
    Rob - you could just be my saviour! Many thanks.

    I'm having a bit of a week of it - and it's only Tuesday!

  8. #8
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: My .htaccess files are restricting access to my images

    Something else you need to do.

    Admin > Tools > Layout Boxes Controller

    Click the 'reset' button at page bottom.

    That will fix the problem you are having with your Template look.

  9. #9
    Join Date
    May 2011
    Posts
    49
    Plugin Contributions
    0

    Default Re: My .htaccess files are restricting access to my images

    Quote Originally Posted by Website Rob View Post
    Something else you need to do.

    Admin > Tools > Layout Boxes Controller

    Click the 'reset' button at page bottom.

    That will fix the problem you are having with your Template look.
    Hi Rob - yep, I did that.

 

 

Similar Threads

  1. v155 Are htaccess files invisible
    By soxophoneplayer in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 8 Apr 2016, 09:39 PM
  2. Are there .htaccess files for Apache 1.3 available for ZC 1.3.x?
    By neekfenwick in forum General Questions
    Replies: 2
    Last Post: 3 Nov 2010, 04:44 AM
  3. stylesheet malfunction - where are the htaccess files?
    By recallcreative in forum Installing on a Linux/Unix Server
    Replies: 8
    Last Post: 5 Jun 2009, 10:36 PM
  4. restricting access
    By timdwyer42 in forum General Questions
    Replies: 2
    Last Post: 6 Apr 2009, 05:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg