I'm trying to include a rewrite rule to my apache configuration file to redirect customers to a different url.

The link to my website is https://openmind.scribesoftware.com. If your user makes its way into a URL with https://openmind.scribesoft.com (note the possible lack of "ware") Let me redirect them as if they'd typed the correct url.

I've attempted a few versions for example:

RewriteEngine on
RewriteCond %{HTTPS_HOST} !^openmind\.scribesoft\.com$ [NC]
RewriteRule ^(.*)$ https://openmind.scribesoftware.com/$1 [R=301,L]

However that leads to the next error:

 This webpage has a redirect loop.

 The webpage at https://openmind.scribesoftware.com//enterprises/571 has resulted in too many redirects.

I curently have a rewrite rule to redirect non-http demands to https demands which is working fine.


HTTPS_HOST isn't a real variable (begin to see the RewriteCond paperwork). Use HTTP_HOST and HTTPS:

RewriteCond %{HTTP_HOST} !^openmind\.scribesoft\.com$ [NC]
RewriteCond %{HTTPS} =on