I am hosting sever sites by using virtual host of apache. Is there any way to redirect any sites hosted on our server to will redirect to non www
I want just one setting in the server so that every site hosted here and that will be hosted later will redirect to non www if there is a www in the request. I dnt like the .htaccess change for all the sites individually.
Enable mod_rewrite and .htaccess through
httpd.conf
and then put this code in your.htaccess
underDOCUMENT_ROOT
directory:Just one rule like this will take care of removing
www
from all of your hosts.