When activated in site settings options "This site handles direct requests to a dedicated IP address»The RewriteRule processing logic changes in .htaccess: instead of HTTP_HOST
should use HTTP:X-Real-host
.
Working redirect directives with www.example.com
on example.com
will look like this:
RewriteCond %{HTTP:X-Real-host} ^www.example.com RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
Some CMS may ignore this issue and continue to use the title HTTP_HOST
, which can cause infinite redirects due to incorrect definition of the current host. In particular, the problem can be observed in WordPress. A quick fix is to disable the "This site handles direct requests to a dedicated IP address».
from 2-00 to 7-00