0

我已经安装了一个 zen cart 插件"Ceon's SEO URL"

管理面板在安装中没有错误,但是当我单击产品名称时在站点上显示 404 错误。

我正在尝试遵循ceon插件的安装步骤,但我遇到了问题

8.Add the Rewrite Rule to the Webserver (Apache/IIS etc.)

所以请帮助我。

我在这个路径上有这个 .htaccess 文件htdocs\zencarttest\zencart,我的 .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

我哪里做错了??

请帮我!提前致谢...

4

1 回答 1

1

Did you write that .htaccess file yourself or you used the automatically generated .htaccess file? If you go to admin->Modules->Ceon URI Config, select Installation Check and click on the Check Installation link, you will get a generated .htaccess file which you need to place in your store's root (in your case htdocs\zencarttest\zencart). If you're still getting a 404, try removing the slash here:

# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* /zencarttest/zencart/index.php [QSA,L]

so you get:

# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* zencarttest/zencart/index.php [QSA,L]

Also, make sure your server has mod_rewrite installed (I've seen some that didn't have it).

于 2012-07-11T10:35:45.827 回答