검색어 'www'에 대한 1 개의 검색 결과

  1. 2008/04/29 apache에서 www와 non-www 리다이렉션 by dhappy

htaccess 파일에 코드 추가 (태터툴즈 경우 ENV:REDIRECT_SURI 위에 삽입)

1. www.도메.com 만 쓸 때

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

2. 도메인.com 만 쓸 때
    
     RewriteCond %{HTTP_HOST} !^도메인\.com$
     RewriteRule (.*) http://도메인.com/$1 [R=301,L]

3. 웹페이지에서 리다이렉트가 제대로 되는지 확인


자세한 매뉴얼 참조는
http://httpd.apache.org/docs/2.2/misc/rewriteguide.html
http://httpd.apache.org/docs/2.2/howto/htaccess.html

2008/04/29 14:06 2008/04/29 14:06
dhappy 이 작성.
TAGS ,