Sometimes you may have multiple domains which you want to use for your website or web application. Probably you needed to park the domains on your hosting cpanel. In this case, you website or web application could be access by more than one domain which is not good for SEO and other 3rd party services may not work.
A simple way to redirect all URLs to a specific URLs is by .htaccess.
Suppose you have the following sub domains and all of them serve your website or web application.
When i am trying to setup a new server, most of the time i just used the default settings of Apache. But sometimes if the server is not equipped with enough RAM, the Apache service may consume all the server resources causing server failure. Here is an example for limited the resource comsumption by Apache. Continue reading →
Redirecting non-www to www url can be simply done by adding a virtual host configuration. For example, if i have a domain ykyuen.com and i want to redirect it to http://www.ykyuen.com, just add the following virtual host. Continue reading →
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 →