1
我在htaccess的這個代碼的所有子域名重定向到主域重定向所有子域的主域除了一些子域
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
我要排除一些子域樣測試.example.com的,所以我編輯了這樣的代碼
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^test\.example\.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
但它不工作它test.exmple.com重定向到主域example.com/test
那麼如何編輯此排除測試的代碼f ROM中的重定向