0

我的 Prestashop 1.4x 安装在子目录中,例如: Apache 服务器上的http://mydomain.com/prestashop/ 。可以选择从管理员那里生成 Htaccess 文件,这些文件被复制到 /prestashop/ 目录中。它是正确的位置还是我应该将 htaccess 放入父(根)目录?

例子:

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# WARNING: PLEASE DO NOT MODIFY THIS FILE MANUALLY. IF NECESSARY, ADD YOUR SPECIFIC CONFIGURATION WITH THE HTACCESS GENERATOR IN BACK OFFICE
# http://www.prestashop.com - http://www.prestashop.com/forums


<IfModule mod_rewrite.c>
# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*\.html /store/product.php?id_product=$2&isolang=$1 [QSA,L]
... ... ...
... ... ...
RewriteRule ^en/best-sales$ /store/best-sales.php?isolang=en [QSA,L]
RewriteRule ^en/page-not-found$ /store/404.php?isolang=en [QSA,L]
</IfModule>

# Catch 404 errors
ErrorDocument 404 /store/404.php

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/javascript "access plus 1 week"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-javascript "access plus 1 week"
    ExpiresByType image/x-icon "access plus 1 year"
</IfModule>

FileETag INode MTime Size
<IfModule mod_deflate.c>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/html text/css text/plain text/javascript application/javascript application/x-javascript
    </IfModule>
</IfModule>
4

1 回答 1

1

这是http://mydomain.com/store/的正确位置

于 2012-10-04T15:51:35.277 回答