Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2009
    Location
    Saskatchewan, CDN
    Posts
    68
    Plugin Contributions
    0

    Default .htaccess file causes problem

    Hi everyone,

    I’ve got a question regarding .htaccess files. I followed the following guidance on putting together a .htaccess file.
    http://tutorials.zen-cart.com/index.php?article=73

    It recommended that I use the following code:

    #.htaccess to prevent unauthorized file access files
    OPTIONS -Indexes -ExecCGI
    IndexIgnore */*
    ### This part says to deny access to EVERYTHING. Afterwards, you'll allow access to JUST the permitted items. See next FilesMatch section.
    <FilesMatch .*>
    Order Deny,Allow
    Deny from all
    </FilesMatch>
    ### NOTE: Add only appropriate PERMITTED filetypes to this list, depending on which folder you're protecting:
    <FilesMatch .*\.(js|css|jpg|gif|png|swf)>
    Order Deny,Allow
    Allow from all
    </FilesMatch>


    After uploading the .htaccess file into the /images folder, it wasn’t visible in either my FTP program or in the cPanel file browser, but it did have an effect. When you clicked a product, the product image was broken and didn’t appear. At first, I wasn’t sure what the cause of this could be, but I made a .htaccess file that contained nothing, uploaded it to the same folder and the problem was SOLVED!

    I emailed my hosting company (Camelot-hosting) about .htaccess files. The service rep said, “Yes you can upload htaccess files ( make sure there are no php over rides in them )”

    Are there any php over rides in the above code? Also, does anyone know why my product images didn't work when I used the above code in my .htaccess file?

    Thanks!!

  2. #2
    Join Date
    Jan 2004
    Posts
    59,767
    Blog Entries
    4
    Plugin Contributions
    133

    Default Re: .htaccess file causes problem

    Quote Originally Posted by jasonhoward64 View Post
    Hi everyone,

    Iíve got a question regarding .htaccess files. I followed the following guidance on putting together a .htaccess file.
    http://tutorials.zen-cart.com/index.php?article=73
    NOTE: If you're using the latest version of Zen Cart, then these .htaccess protections are already in place.
    Quote Originally Posted by jasonhoward64 View Post
    After uploading the .htaccess file into the /images folder, it wasnít visible in either my FTP program
    That's likely because most FTP programs are configured by default to hide files starting with a "." in the filename. (The "." means "hidden" in most operating systems.)
    Quote Originally Posted by jasonhoward64 View Post
    When you clicked a product, the product image was broken and didnít appear.
    Maybe you put it in the wrong place? Maybe you put a typo in it?
    Quote Originally Posted by jasonhoward64 View Post
    I made a .htaccess file that contained nothing, uploaded it to the same folder and the problem was SOLVED!
    That would be the same as deleting the .htaccess file itself.
    Quote Originally Posted by jasonhoward64 View Post
    Are there any php over rides in the above code?
    No.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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
    Jun 2009
    Location
    Saskatchewan, CDN
    Posts
    68
    Plugin Contributions
    0

    Default Re: .htaccess file causes problem

    Thanks Dr. Byte.

    I think I've got everything working. I'm not sure if you'll see this, but I just want to know that you've changed my life with Zen Cart. For that, I thank you!

  4. #4
    Join Date
    Jan 2004
    Posts
    59,767
    Blog Entries
    4
    Plugin Contributions
    133

    Default Re: .htaccess file causes problem

    Thanks!
    Glad you got it sorted out!
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.

 

 

Similar Threads

  1. .htaccess file 1.3.9h ?
    By Muzz in forum General Questions
    Replies: 4
    Last Post: 18 Dec 2010, 03:40 AM
  2. htaccess file - Is it really different
    By TzuLady in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 10 Apr 2010, 05:26 PM
  3. Problem with .htaccess file
    By number5 in forum General Questions
    Replies: 4
    Last Post: 30 Sep 2009, 02:20 AM
  4. htaccess File Necessary?
    By dkjwebs in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 10 Aug 2008, 05:59 AM
  5. .htaccess file
    By mrbert in forum General Questions
    Replies: 0
    Last Post: 22 Apr 2007, 10:06 AM

Bookmarks

Posting Permissions

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