Magento, redirect the url from “www.domain.com/home” to base url “www.domain.com”

て烟熏妆下的殇ゞ 提交于 2019-12-25 03:01:20

问题


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

UPDATE

Thanks Amit, I use your solution

RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*/accueil
RewriteRule ^(.*)accueil$ http://www.cabas-durables.fr/$1 [R=301,L]

but I got error at the browser says

The page isn't redirecting properly

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"

I don't know where to change it to only "http://www.cabas-durables.fr/"

I will have problem with SEO if it not change

thanks


回答1:


It can be better to use htaccess. find

Options +FollowSymLinks
 RewriteEngine on 

Then Put the below code in htaccess file

RewriteCond %{THE_REQUEST} ^.*/home
RewriteRule ^(.*)home$ http://www.domain.com/$1 [R=301,L] 



回答2:


Create URL Redirect in admin panel.

Use tagret path - "../"; it will redirect to the homepage.



来源:https://stackoverflow.com/questions/23129310/magento-redirect-the-url-from-www-domain-com-home-to-base-url-www-domain-com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!