找不到Opencart SEO URL 404

问题描述 投票:1回答:1

在OpenCart管理面板中启用SEO URL后,所有链接都返回404-未找到。

我的.htaccess文件

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

该站点位于/var/www/html/opencurt中,我试图更改为RewriteBase /opencurt,但这无济于事。我还清除了缓存。

本地计算机上的当前URL为http://127.0.0.1/

我知道这是一个普遍的问题,但我自己无法解决。

php apache .htaccess opencart
1个回答
0
投票

所有文件-从版本OpenCart包装中获取默认的。htaccess.txt文件。

现在,您必须将。htaccess.txt重命名为。htaccess。在Windows上并不是那么容易。使用记事本将其打开,然后另存为文件,将其重命名为。htaccess,而不使用.txt

尽管,请确保您使用的是Apache网络服务器,因为仅

如果您使用的是这样的地址http://127.0.0.1/-您的重写基址为RewriteBase /

在SEO URL中,您只能使用拉丁符号,数字,减号(-)和下划线(_)。没有空格或其他特殊字符。

更新

每个类别,产品,制造商都有SEO字段。您应该将它们每个的SEO字段填写到SEO URL(或更好的SEO PRO)中才能正常工作。

© www.soinside.com 2019 - 2024. All rights reserved.