Redirecting to another site in User Directory in APACHE

Sometimes your users may require you to redirect to their new site and even capture errors like 404, 401 in their old site and redirect to their new site. You can do it by doing the following.

Step 1: After clearing out all the old site, you may want to put in a redirection page. Can be a simple one line on a index.html

Step 2: To trap “missing or ghost directory and files” in the website of the user directory. For example the old site could be

You may want to create a .conf file such as myoldsite.conf and placed it at /etc/httpd/conf.d and put in the following configuration.

Step 3: Update the httpd service.

For CentOS 7, it could be

# systemctl start httpd.service

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.