Results 1 to 10 of 22

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    836
    Plugin Contributions
    0

    Default Problems with .htaccess support.

    Not sure why I am getting this error. .htaccess files are in all directories except the main directory. And apache says deny everyone all files that start with .ht

    So why am I getting this? I grabbed it from sourceforge with wget. I feel like I should wait before installing.

    <FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
    </FilesMatch>

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Problems with .htaccess support.

    If you're referring to zc_install telling you that it discovered problems with .htaccess support, you'll find that it is explained in more detail by clicking on that message.

    One of the protections that the .htaccess rules provides is to deny access to certain files that normal visitors ought not to ever be able to access. So zc_install makes an external call to attempt to access some of those normally-forbidden files using CURL to simulate a rogue visitor. When the response to that is a "200 OK" instead of a "403 Forbidden" it reports back the "Problems with .htaccess" message.

    It does this by attempting to access one of the /includes/xxxxxxxx.php files. If yours is allowing access to that file, then your .htaccess rules aren't working, and you'll need to adapt your Apache configuration to allow it.

    You're free to proceed with installation as long as you don't care that your server is not preventing visitors from accessing parts of the ZC file structure that they shouldn't be able to.
    .

    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
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    836
    Plugin Contributions
    0

    Default Re: Problems with .htaccess support.

    Its just the main directory where the access file is missing. I unzipped .e and there is no such file in the main directory.

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

    Default Re: Problems with .htaccess support.

    See if this works for you.

    public_html/.htaccess

    Code:
    <Files ".ht*">
    Deny from all
    Allow from localhost
    </Files>
    Also, a good idea to set 444 permissions on any/all .htaccess files. You just have to remember that to edit an .htaccess file change permissions to 644.

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Problems with .htaccess support.

    Quote Originally Posted by pixelpadre View Post
    Its just the main directory where the access file is missing. I unzipped .e and there is no such file in the main directory.
    This is because with a default install, an .htaccess file isn't needed in the main directory (root folder). The .htaccess files in *other* folders are to prevent spiders/crawlers/hackers from accessing those folders (or certain files within those folders), but the root folder (for any site) should be 'open for all' (else there isn't really a point of running a website).

    The .htaccess files themselves generally (and should always) have restricted access (IOW - 'deny from all'). The webserver itself can/will still be able to read these files, but people/bots/hackers can't.

    If the *server* is unable to access the .htaccess file(s) they will be ignored. The only reason why a server would not be able to read them is if the folder or file *permissions* prevent it from doing so. It is *very* unlikely that the root folder would have unsuitable permissions else the site probably wouldn't be working at all, so problems in this regard will boil down to ownership/permissions of the .htaccess file(s) themselves.

    Please keep in mind though, that the root folder doesn't need an .htaccess file (which is why none is supplied). You want the files in this folder to be readable by all, ergo, .htaccess not needed.

    Hope this clarifies rather than confuses?

    Cheers
    RodG

  6. #6
    Join Date
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    836
    Plugin Contributions
    0

    Default Re: Problems with .htaccess support.

    I just can't figure out why the install warned me about no htaccess. Apache is configured for default values.

    Found this apache article very interesting

    https://httpd.apache.org/docs/2.4/howto/htaccess.html
    Last edited by pixelpadre; 15 Jun 2017 at 12:24 PM.

  7. #7
    Join Date
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    836
    Plugin Contributions
    0

    Default Re: Problems with .htaccess support.

    So it looks like the apache 2.4 config file has allowoverides set to none, but vhost config has allowoverides set to all. So which has priority?

 

 

Similar Threads

  1. v139h Custom .htaccess problems with existing html site while testing in subfolder
    By dw08gm in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 May 2012, 06:55 PM
  2. Problems with .htaccess vs streamline.net/fasthosts
    By ian8115 in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 4 Aug 2010, 06:11 PM
  3. .htaccess problems with media previews in music products
    By BlessIsaacola in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 22 Apr 2010, 01:51 AM
  4. Problems with multilanguage support
    By pib in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 12 May 2006, 08:14 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