2
.htaccess를 사용하여 여러 개의 이전 도메인에서 새 도메인으로 사용자를 리디렉션합니다. 이런 식으로 뭔가 : 그러나.htaccess 리디렉션에서 "NOT"연산자를 사용하는 방법은 무엇입니까?
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} oldsite1.com
RewriteRule ^(.*)$ http://newsite.com%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} oldsite2.com
RewriteRule ^(.*)$ http://newsite.com%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} oldsite3.com
RewriteRule ^(.*)$ http://newsite.com%{REQUEST_URI} [R=301,L]
, 나는이 같은 newsite.com 제외한 모든 도메인을 리디렉션 할 NOT 연산자를 사용할 수 있는지 알고 싶습니다
Options +FollowSymLinks
RewriteEngine On
RewriteCond != %{HTTP_HOST} http://newsite.com
RewriteRule ^(.*)$ http://newsite.com%{REQUEST_URI} [R=301,L]
대단히 감사합니다!