I recently noticed my ip address was being indexed and I added the following code to my .htaccess
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.mysite\.tld$
RewriteRule (.*) [
mysite.tld...] [R=301,L]
This worked fine at redirecting the IP addresses to the domain name. I have since added a secure domain at
[
secure.mysite.tld...] however requests to this address are now being redirected [
mysite.tld...]
Is there a way of adding and OR statement to the RewriteCond?
Like
RewriteCond %{HTTP_HOST} !^www\.mysite\.tld$ OR !^secure\.mysite\.tld$
Help much appreciated.