Answer the question
In order to leave comments, you need to log in
Redirect from www to http not working?
There is a site. I prescribe:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^site.com$ [NC]
RewriteRule ^(.*)$ http://site.com/$1 [R=301,L]
Answer the question
In order to leave comments, you need to log in
And there is definitely a 404 error, not a DNS error, and it is not possible to find the address from www.
You need to check if there is an A-record for www in the DNS settings.
And in the web server settings, check if there is a www alias.
well, because you didn't write a redirect
RewriteCond %{HTTP_HOST} !^www.site.com$ [NC]
RewriteRule ^(.*)$ site.com/$1 [R=301,L]
and protocol
and did not escape special characters
RewriteCond %{HTTP_HOST} !^www\.site\.com$ [NC]
RewriteRule ^(.*)$ https://site.com/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question