htaccess rule redirect non www to www - litespeed server

Posted by webdev28 on Stack Overflow See other posts from Stack Overflow or by webdev28
Published on 2010-06-09T17:05:36Z Indexed on 2010/06/09 17:32 UTC
Read the original article Hit count: 434

Filed under:
|
|

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]

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 

I wonder whether I had incorrect htaccess rule or this is because of bug in litespeed? I have searched anywhere for hours...Thanks

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about redirect