You can use Apache's HTTP redirects to forward an incoming request to another address. This can be useful if the address of your webpage changes or you would like to create a memorable URL address, which will redirect to a longer address of a specific page.
Let's say that we used to host a number of articles at http://oldsite.com/articles/, and we decided to move our site to another domain, and the same articles will now be hosted at http://example.com/info/
.
We can configure Apache at our old site to redirect all incoming requests to the new domain.
Before starting, make sure that the module alias
is enabled in your Apache configuration. Take a look at the recipe Enabling Apache modules for more information.