Home Apache rewrite about www to non-www redirection
 I have a question about the Apache Rewrite module. I am using 2 servers. One is an active server and the other is a test server, Both are completely the same, about the OS , the Apache version and Apache configuration. First, the OS is ubuntu 16.04, and the Apache version is 2.4.29. These servers are using redirects through the vhost file. non-www to www redirection works well on both server. The code like this : RewriteEngine on RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/ RewriteRule ^ - [END] RewriteCond %{HTTP_HOST} ^example\.com$[NC] RewriteRule ^(.*)$ http://www.example.com$1 [R=301,NE,L]  However, when using www to non-www redirection, it works well on the test server, but does not work on the active server. The code like this : RewriteEngine on RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/ RewriteRule ^ - [END] RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteRule ^(.*)$http://example.com$1 [R=301,NE,L]  It is not related to ServerAlias. both servers have same configration. In this case, where can I find out the problem? Sorry for my English.