372 Wiki 372 Wiki

  • Home
  • Forums
  • Categories
    • Billing
    • Bookkeeping
    • Copyright & Legal
    • Clients
    • Designer Guides
    • Developer Guides
    • Getting Started
    • Troubleshooting
    • Workplace
Home / Developer Guide / cPanel Redirect Old to New Site using htaccess

cPanel Redirect Old to New Site using htaccess

19 views 1 min , 15 sec read 0

The below instructions will guide you through redirecting an old site to a new site using htaccess.

For illustrative purposes the information below is based on:

Old Domain – cuc.org.au
New Domain – www.cuc.edu.au

If they have an IT company in charge of the domain name, best to hand this to them to configure otherwise if we own the domain, login to the Domain Name Registrar and edit the A-Records to point to the IP Address of our server host. In this case

A-Record – cuc.org.au = Our host IP Address
A-Record – www.cuc.org.au = Our host IP Address

DO NOT POINT NS RECORDS unless we are hosting emails and emails are transferred to our host. If emails are hosted and NS Records are changed, they will break.

Now head over to cPanel and then select “Addon Domains”. In the form fill out without the www. the domain. Subdomain and document root leave as is and then click add domain.

On the same screen after its created, find the addon domain created below and then click “manage redirection”. On this screen enter the new domain where the site sits. In this case it was https://www.cuc.edu.au/. Click save when complete.

Your addon domain should look like this if done correctly.

Now head over to the file manager and select the new addon domain’s folder. You want to create two files here:

  1. .htaccess – Copy code below for redirection into this file when created
  2. index.php – Just a blank file needed here.

Now inside .htaccess add the following code below. This will redirect all of cuc.org.au including inside pages to cuc.edu.au. It does mean that cuc.org.au/about will redirect to https://www.cuc.edu.au/about. If the page in the new site does not exist it will go to a 404. Edit the below snippet for with your domain you would like to redirect and save.

RewriteEngine on

RewriteCond %{HTTP_HOST} ^cuc\.org\.au$ [OR]
RewriteCond %{HTTP_HOST} ^www\.cuc\.org\.au$
RewriteRule ^(.*)$ "https\:\/\/www\.cuc\.edu\.au\/$1" [R=301,L]

That should be all, if this done correctly then the old site should now be redirecting to the new site.

Developer Guide

About James Apoefis

View all posts by James Apoefis →

Related Articles

  • WordPress Multi-Site Deplyment
  • Version Control
  • JA Theme Setup Documentation
  • Website and Application Development Workflow

Article Categories

  • 9Billing
  • 3Bookkeeping
  • 2Cimara
  • 5Client
  • 11Copyright & Legal
  • 2Designer Guide
  • 18Developer Guide
  • 11Getting Started
  • 2Troubleshooting
  • 10Workplace

Most Viewed

  • Using my credit 112
  • What is WordPress? 64
  • Account overview 51
  • Why can’t I download the latest theme version (zip file)? 49
  • How do you customize the navigation? 49

Most Liked

  • Using my credit 5
  • Why can’t I download the latest theme version (zip file)? 3
  • What is WordPress? 2
  • Authentication policy 1
  • Workplace Communication 1

Article Categories

Billing Bookkeeping Cimara Client Copyright & Legal Designer Guide Developer Guide Getting Started Troubleshooting Workplace

Any questions

For all management related matters please refer to Ben Brillante

For any Cimara functional issues please refer to Rushabh Padalia.

For client based issued please refer to James Apoefis

© Copyright 372 Digital Pty Ltd. All rights reserved.