我刚刚在我的1.6.1 prestashop中启用了多重存储,并在我的默认商店之外添加了一个新商店.
默认店铺地址: http://lak-lak.ir
新的多店地址: http://lak-lak.ir/ghods
默认店铺地址: http://lak-lak.ir
新的多店地址: http://lak-lak.ir/ghods
似乎在新店的主页上一切都很好,但是对于联系我们,最佳搜索和其他页面的页面,Prestashop显示404错误页面.
怎么解决这个问题?
附:我的商店也启用了URL重写功能.
这是.htaccess文件的内容:
# ~~start~~ Do not remove this comment,Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums <IfModule mod_rewrite.c> <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule> RewriteEngine on #Domain: lak-lak.ir RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api$api/ [L] RewriteRule ^api/(.*)$%{ENV:REWRITEBASE}webservice/dispatcher.PHP?url=$1 [QSA,L] # Images RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$js/jquery/plugins/fancybox/images/$1.$2 [L] #Domain: lak-lak.ir RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api$api/ [L] RewriteRule ^api/(.*)$%{ENV:REWRITEBASE}webservice/dispatcher.PHP?url=$1 [QSA,L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^ghods$/ghods/ [L,R] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^ghods/(.*) /$1 [L] # Images RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$%{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^.*$- [NC,L] RewriteCond %{HTTP_HOST} ^lak-lak.ir$ RewriteRule ^.*$%{ENV:REWRITEBASE}index.PHP [NC,L] </IfModule> AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/otf .otf AddType application/x-font-woff .woff <IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$"> Header add Access-Control-Allow-Origin "*" </FilesMatch> </IfModule> #If rewrite mod isn't enabled ErrorDocument 404 /index.PHP?controller=404 # ~~end~~ Do not remove this comment,Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
我过去遇到过这个问题,我解决了这个问题:
您必须确保在apache服务器中启用了mod重写&在目录中设置AllowOverride all
看看这些主题:
> How to enable mod_rewrite for Apache 2.2
> How to Set AllowOverride all
希望这适合你:)