【发布时间】:2013-06-07 02:59:47
【问题描述】:
我的网站位于http://www.artsplash.in,我正试图将我的网站的非 www 版本重定向到 www 版本(而且我不知道我的服务器是否在我不知情的情况下自行反其道而行之)。 我已经有 .htaccess 文件了
# DO NOT REMOVE THIS LINE AND THE LINES BELOW HOTLINKID:nunaquvaQe
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://artsplash.in/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://artsplash.in$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.artsplash.in/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.artsplash.in$ [NC]
RewriteRule .*\.(1)$ http://www.artsplash.in [R,NC]
# DO NOT REMOVE THIS LINE AND THE LINES ABOVE nunaquvaQe:HOTLINKID
# DO NOT REMOVE THIS LINE AND THE LINES BELOW REDIRECTID:anajuqehyv
RewriteEngine on
RewriteCond %{HTTP_HOST} ^artsplash.in$ [OR]
RewriteCond %{HTTP_HOST} ^www.artsplash.in$
RewriteRule ^mail$ http://webmail1.nazuka.net/roundcube/ [R=301,L]
# DO NOT REMOVE THIS LINE AND THE LINES ABOVE anajuqehyv:REDIRECTID
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^login$ wp-login.php
RewriteRule ^register$ wp-login.php?action=register
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
我自己为重定向到 www.artsplash.in 所做的任何事情都会导致浏览器消息显示该站点存在重定向循环。我究竟应该在我的 .htaccess 文件中添加什么以获得所需的结果? - 非常需要帮助。
【问题讨论】:
标签: .htaccess redirect http-status-code-301