허용된 호스트로만 접근 가능하도록 Apache 웹 서버의 .htaccess 설정

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

allow1.yourdomain.com과 allow2.yourdomain.com으로만 아파치 웹서버로 접근가능하도록 .htaccess의 rewrite engine을 설정하는 방법입니다.
allow3.yourdomain.com으로 접근하면 forbidden(403) 오류가 발생합니다.

RewriteEngine On

RewriteCond %{HTTP_HOST} !^allow1.yourdomain.com$
RewriteCond %{HTTP_HOST} !^allow2.yourdomain.com$
RewriteRule .* - [F,L]

감사합니다.

댓글

Popular Posts

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

AI 메모리 HBM 외에 HBF도 주목

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