【发布时间】:2015-07-30 13:20:37
【问题描述】:
目前我正在使用 3 个不同的域运行 Magento。我想为这三个中的每一个设置一个 301 重写规则,所以“www”。当用户输入“domain.de”时被添加到他们中
例如:domain.de 被重写为 www.domain.de
目前我的代码如下:
Rewriteengine on
RewriteCond %{HTTP_HOST} !^www\.domain\.de$ [NC]
RewriteRule ^(.*)$ http://www.domain.de/$1 [L,R=301]
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} !^www\.example\.de$ [NC]
RewriteRule ^(.*)$ http://www.example.de/$1 [L,R=301]
问题是代码导致了重定向循环,我不知道问题可能是什么。 如果有人能告诉我代码有什么问题,我会很高兴...
【问题讨论】:
标签: apache .htaccess magento mod-rewrite redirect