我已经安装了一个zen cart插件"Ceon's SEO URL"
。
管理面板在安装中没有错误,但在我点击产品名称时在网站上显示404错误。
我正在尝试遵循ceon插件的安装步骤,但我遇到了问题
8.Add the Rewrite Rule to the Webserver (Apache/IIS etc.)
所以请帮助我。
我在此路径htdocs\zencarttest\zencart
上有此.htaccess文件,而我的.htaccess如下:
## BEGIN CEON URI MAPPING REWRITE RULE
RewriteEngine On
# ONLY rewrite URIs beginning with /zencarttest/zencart/
RewriteCond %{REQUEST_URI} ^/zencarttest/zencart/ [NC]
# Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
RewriteCond %{REQUEST_URI} !\.[a-zA-Z]{2,5}$ [OR]
RewriteCond %{REQUEST_URI} \.(html)$ [NC]
# Don't rewrite any URIs for some specific file format extensions,
# which are not covered by main file extension condition above
# Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/zencarttest/zencart/admin_test [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/zencarttest/zencart/editors/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* /zencarttest/zencart/index.php [QSA,L]
## END CEON URI MAPPING REWRITE RULE
我在哪里弄错了?
请帮帮我!提前谢谢......
答案 0 :(得分:1)
您是自己编写.htaccess文件还是使用自动生成的.htaccess文件?如果您转到admin-> Modules-> Ceon URI Config,选择安装检查并单击检查安装链接,您将获得生成的.htaccess文件,您需要将其放入商店的根目录(在您的案例中为htdocs \ zencarttest \ ZENCART)。如果您仍然获得404,请尝试删除斜杠:
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* /zencarttest/zencart/index.php [QSA,L]
所以你得到:
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* zencarttest/zencart/index.php [QSA,L]
另外,请确保您的服务器安装了mod_rewrite(我见过一些没有安装mod_rewrite)。