本文介绍了htaccess的规则重定向非万维网到www - 的Litespeed服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个关于我的Litespeed服务器使用htaccess的问题。我试过 http://domain.com
到 http://www.domain.com
使用这个法则来重定向
I have a question about using htaccess in my litespeed server. I tried to redirect http://domain.com
to http://www.domain.com
using this rule:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule .* http://www.domain.com/ [L,R=301]
当我检查 http://domain.com
使用Xenu,结果如下:
When I check http://domain.com
using Xenu, the result is as follow:
http://domain.com/ 200 ok text/html 301 Moved Permanently
http://domain.com/%s 200 ok text/html 301 Moved Permanently
http://www.litespeedtech.com/ 200 ok text/html LiteSpeed Web Server
http://www.domain.com/ 200 ok text/html redir
我不知道我是否有不正确的htaccess规则或这是因为在的Litespeed的bug?我已搜查任何地方几个小时...谢谢
I wonder whether I had incorrect htaccess rule or this is because of bug in litespeed? I have searched anywhere for hours...Thanks
推荐答案
@mipadi:我想这是不是301重定向(是吗?)。以下是我得到了Xenu:
@mipadi:I guess it is not 301 redirected (or is it?). Here is what I got from Xenu:
http://domain.com/ 200 ok text/html Homepage
http://cdn.domain.com/css/style.css 200 ok text/css
http://www.domain.com/about/ 200 ok text/html About
http://www.domain.com/contact/ 200 ok text/html Contact
这篇关于htaccess的规则重定向非万维网到www - 的Litespeed服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!