Domanda

Ho quanto segue:

RewriteEngine On

# Check if the host name contains a . (localhost won't)
# Check if the host name starts with www
# Check if the host name ends with .com
# Check if the connection is secure
RewriteCond %{HTTP_HOST}  \.
RewriteCond %{HTTP_HOST} !^www   [OR]
RwriteCond  %{HTTP_HOST} !\.com$ [OR]
RewriteCond %{HTTPS}     !=on
RewriteRule ^.*$ https://www.myDomain.com/$0 [R=301,L]
.

Voglio escludere questi controlli per svn.mydomain.com (cioè svn.mydomain.com non reindirizza affatto. Come faccio a farlo?

È stato utile?

Soluzione

Un modo semplice sarebbe quello di aggiungere

RewriteCond %{HTTP_HOST} !svn.mydomain.com
.

Prima delle tue condizioni esistenti.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top