HTACCESS RewriteCond without messing up localhost
snippet in htaccess

HTACCESS RewriteCond without messing up localhost

user5730

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} !=svn.myDomain.com
RewriteCond %{HTTP_HOST} !^www   [OR]
RewriteCond  %{HTTP_HOST} !\.com$ [OR]
RewriteCond %{HTTPS}     !=on
RewriteRule ^.*$ https://www.myDomain.com/$0 [R=301,L]