Magento,从"www.domain.com/home"重定向网址以网址"www.domain.com"为基础 [英] Magento, redirect the url from "www.domain.com/home" to base url "www.domain.com"

查看:79
本文介绍了Magento,从"www.domain.com/home"重定向网址以网址"www.domain.com"为基础的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试配置如何将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]

但浏览器显示错误

页面无法正确重定向

The page isn't redirecting properly

然后在 http://www.cabas-durables.fr/$1 > $ 1到index.php,则显示" http://www.cabas-durables.fr/index.php ",然后将其恢复为$1我没有错误,但仍然停留在"

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文件中

Then Put 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"为基础的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆