Php 使用opencart站点和管理员创建两次基本url

Php 使用opencart站点和管理员创建两次基本url,php,.htaccess,opencart,Php,.htaccess,Opencart,我已将opencart上载文件夹上载到文件夹 现在,当我打开它时,它正在打开,但在点击任何导航菜单(如联系我们)后,显示404错误,地址栏中的url为 而不是 但当我停留在链接上时,它在浏览器底部显示了完美的url。(例如,在上述情况下,悬停时显示-” 如何修复它 编辑**** opencart/文件夹中的my.htaccess: RewriteBase / RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]

我已将opencart上载文件夹上载到文件夹

现在,当我打开它时,它正在打开,但在点击任何导航菜单(如联系我们)后,显示404错误,地址栏中的url为

而不是

但当我停留在链接上时,它在浏览器底部显示了完美的url。(例如,在上述情况下,悬停时显示-”

如何修复它

编辑****

opencart/文件夹中的my.htaccess:

RewriteBase / 
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]   
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] 
RewriteRule ^system/download/(.*) /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]

不清楚您正在运行哪个版本的OpenCart,但在所有最新版本中,在提供的.htaccess文件中,RewriteBase规则上方都有一条注释:

# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
所以把它改成

RewriteBase /opencart/

请向我们展示您的
.htaccess
文件。您很可能需要添加
RewriteBase
@MikeRockett.htaccess文件包含RewriteBase/第一个
/
后URI中额外的
example.com
表明您的
RewriteRule
中存在错误。请将.htaccess也发布到/opencart目录中与站点根目录中存在的任何.htaccess一样。@MichaelBerkowski.htaccess:RewriteBase/RewriteRule^sitemap.xml$index.php?route=feed/google_sitemap[L]RewriteRule^system/download/(.*)/index.php?route=error/not_found[L]RewriteCond%{REQUEST_FILENAME}!-f RewriteCond%{REQUEST_FILENAME}!-d RewriteCond%{REQUEST_URI}.*\.(ico | gif | jpg | jpg | png | js | css)RewriteRule ^([^?]*)index.php?\u route\=$1[L,QSA]@darshan请编辑上面添加.htaccess内容,而不是将其放在评论中。