If you can’t edit the Apache configuration, you can do the redirection by setting up a virtual host as discussed in the post below.
Apache – Redirect non-www to www Subdomain
Or if you can add the following lines in the webroot .htaccess for the redirection. Continue reading .htaccess – Redirect non-www to www Subdomain
We can use .htaccess to redirect http://example.com to http://www.example.com by using the rewrite engine. But i find another simple way to implement the redirection just by setting up a VirtualHost.
Assume you have the current VirtualHost setting as follow. Continue reading Apache – Redirect non www to www using VirtualHost setting
Sometimes we may want to have more than one domain name and all point to the same website. This can be done by setting up a rewrite in the Apache VirtualHost setting.
Assume we have setup a website with domain abc.com using the following VirtualHost setting. Continue reading Apache – Redirect Domain