问题描述
我正在尝试配置如何将magento网站从www.domain.com/home
重定向到基本URL www.domain.com
,它始终重定向到www.domain.com/home
I am trying to configure how to redirect my magento website from www.domain.com/home
to base url www.domain.com
, it always redirecting to www.domain.com/home
更新
感谢阿米特,我使用您的解决方案
Thanks Amit, I use your solution
RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*/accueil
RewriteRule ^(.*)accueil$ http://www.cabas-durables.fr/$1 [R=301,L]
但浏览器显示错误
然后在 http://www.cabas-durables.fr/$1 > $ 1到index.php
,则显示" http://www.cabas-durables.fr/index.php ",然后将其恢复为$1
我没有错误,但仍然停留在" http://www.cabas-durables.fr/index.php "
then I change the $1
after http://www.cabas-durables.fr/$1 to index.php
, then it shows "http://www.cabas-durables.fr/index.php" at the browser, then I bring it back to $1
I got no error but it stays to "http://www.cabas-durables.fr/index.php"
我不知道将其更改为仅" http://www.cabas-durables.fr /"
I don't know where to change it to only "http://www.cabas-durables.fr/"
如果SEO不变,我将遇到问题
I will have problem with SEO if it not change
谢谢
推荐答案
使用htaccess可能会更好. 找到
It can be better to use htaccess. find
Options +FollowSymLinks
RewriteEngine on
然后将以下代码放入htaccess文件中
ThenPut the below code in htaccess file
RewriteCond %{THE_REQUEST} ^.*/home
RewriteRule ^(.*)home$ http://www.domain.com/$1 [R=301,L]
这篇关于Magento,从"www.domain.com/home"重定向网址以网址"www.domain.com"为基础的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!