Book Image

Webmin Administrator's Cookbook

By : Michal Karzynski
Book Image

Webmin Administrator's Cookbook

By: Michal Karzynski

Overview of this book

Table of Contents (19 chapters)
Webmin Administrator's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Redirecting incoming requests


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.

Getting ready

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.

How to do it...

On your old server, follow these steps to create a redirect to your new domain:

  1. Navigate to Servers | Apache Webserver | Existing virtual hosts.

  2. Select the virtual host, which will perform the redirect, for example, Default Server...