2010-06-09 5 views
0

litespeed 서버에서 htaccess를 사용하는 것에 대한 질문이 있습니다. 나는이 규칙을 사용하여 http://www.domain.comhttp://domain.com을 재 시도 : 내가 나서서 제누를 사용하여 http://domain.com을 검사 할 때htaccess rule www가 아닌 ​​www 리디렉션 서버를 리디렉션합니다.

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/ 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의 버그? 나는 감사합니다 ... 어디서나 시간 동안 검색 한

답변

0
당신이 재 작성과 www가 하위 도메인에 www가 아닌 ​​하위 도메인을 리디렉션 할 수 있습니다

:

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

@mipadi : 나는 그것을 재 (301)없는 것 같다 (또는 입니다 그것?). 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 
+0

아무도 답변을 드릴 수 없습니까? –

+0

mipadi의 대답이 301 리디렉션 설정에 맞지 않습니까? –

관련 문제