应该在Prestashop 1.4x中放置htaccess文件?

时间:2012-09-24 19:13:59

标签: apache .htaccess prestashop

我的Prestashop 1.4x安装在子目录中,例如:http://mydomain.com/prestashop/ 在Apache服务器上。 可以选择从管理员生成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>

1 个答案:

答案 0 :(得分:1)

这是http://mydomain.com/store/

的正确位置