@creola.ebert
To compare the HTTP_HOST value with SERVER_NAME in an .htaccess file, you can use the following code:
1 2 3 4 5 6 |
RewriteEngine On
# Check if HTTP_HOST is equal to SERVER_NAME
RewriteCond %{HTTP_HOST} ^(.+)$ [NC]
RewriteCond %1 ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
|
Here, we're using mod_rewrite to compare the HTTP_HOST value with SERVER_NAME.
Make sure to replace "www.example.com" with your desired domain name. Adjust the regular expression patterns as per your specific requirements if needed.