2.7.1.1.4. Specifics of redirect operation when using dedicated IP

When the "Open site when specifying dedicated IP in browser address bar" option is enabled in the site settings (see Dedicated IP for hosting), the RewriteRule processing logic in .htaccess changes: instead of HTTP_HOST, you need to use HTTP:X-Real-host.

Working redirect directives from www.example.com to example.com will look like this:

RewriteCond %{HTTP:X-Real-host} ^www.example.com
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

Infinite redirect

Some CMS may not take this feature into account and continue to use the HTTP_HOST header. This can cause infinite redirection due to incorrect determination of the current host. In particular, the problem can be observed in WordPress. A quick solution would be to disable the option "Open site when specifying dedicated IP in browser address bar".
Content