Redirect를 위한 Apache 웹 서버의 .htaccess 설정

안녕하세요, 하마연구소입니다.

특정 호스트로 접속하면 redirect하도록 Apache 웹 서버 .htaccess의 rewrite engine을 설정하는 방법입니다.
yourmain.com과 home.yourdomain.com으로 접근하면 www.yourdomain.com으로 redirect 합니다.

RewriteEngine On

RewriteCond %{HTTP_HOST} ^yourdomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^home.yourdomain.com$
RewriteRule .* http://www.yourdomain.com? [R=302,L]

감사합니다.

댓글

Popular Posts

AI 시대, SEO가 아닌 GEO에 포커싱해야 하는 이유

AI 메모리 HBM 외에 HBF도 주목

네이버 쇼핑 잘 나가네요, 구팡이 절대 강자인줄~