Kamloops Website Design, Kamloops Website Development and Kamloops Website Hosting - Adroit Technologies (ATWS)

 

How to Migrate your Website

 

Welcome to part three of our guide about how to migrate your website! This guide is a five part series describing some high level techniques that are common to website and server migrations. Don't forget to check out part two of this guide for information website log monitoring using Linux.

What's Going On?

This is part three of a five part guide concerning website and server migration. In this part, we will be discussing the creation of rewrite rules and tracking changed URLs between the old site and the new site.

Setting up Rewrite Rules to Capture lost and changed urls

Migrating from one CMS to the other has become easier as many of these applications are starting to follow the same idea with friendly urls and database driven architecture. But if you are migrating from an older CMS which relied on URL parameters in the query string or differences in the friendly url parameters between CMSs you will need to make sure those urls are being routed to the correct new pages. This same idea applies if your new website site has a different menu structure or filenames have changed. I will go over how to make changes in the rewrite rules for query string matching and full filename matching.

Finding urls that need to be updated

There are a couple ways to go about this, and using the combination of the two is probably a good plan regardless. If your site has been on the web for more then a week you probably have existing information is web search engine caches, or links from other websites. These links that lead to 404 pages will hurt your page rank and other factors of SEO, customer loyalty and retention.

We have directions for the two main Search Engines, Google and Bing.

Using Your Google Webmaster Account to find Links

Login to your Google Webmaster Tools Account.

If you do not have a Google Webmasters Tools Account, sign up for one now or skip to the next option.

Select Your site from the Site listings

Click "Your Site on the Web" Then Click "Internal Links". This screen shows you a list of links that are used internally in your website and also are found in the Google Search Engine.

Using the Google Site Search to Find Links

Go to Google and using the Advanced Search we are going to search for all links related to your website.

site:atws.ca

Using Your Bing Webmaster Account to find Links

Login to your Bing Webmaster Tools Account. If you do not have one sign up for one now or skip to the next option.

Select Your site from the Site listings

Click on the "Index" tab Then Click "Index Explorer" This screen shows you a list of links that are used internally in your website and also are found in the Bing Search Engine.

Using the Bing Site Search to Find Links

Go to http://www.bing.com. Using the advanced search keywords, we are going to search for all links related to your website.

site:atws.ca -index

Using what we have found to Create Rewrite Rules

Due to caching on the internet, search engine caching, transparent proxies, proxy caching servers and a host of other related technologies, there may be servers containing old information and we need to make sure that we are redirecting people to the proper new pages on our website even if they go to the old URL. There are far more reasons why this is important (SEO, etc) but we are not going to get in to that on this posting.

There are two places you can put Rewrite Rules in Apache:

We are going to work with our rules in the virtual host entries for the purpose of this guide.

Creating the Rewrite Rules

First we need to make sure the Rewrite Engine is Loaded in Apache

sudo a2enmod rewrite
sudo apache2ctl graceful

This will load the rewrite rule engine in to Apache, then we need to reload Apache to load the module in the configuration.

Determine what type of rewrite rule to use

  1. Did you old website use flat files, or have a friendly url rewrite rule that makes it appear as a flat file.
  2. Did your website use a friendly urls rewrite rule that is based on directories?
  3. Did you old website use URL query string parameters?

The good thing is that Apache will only see what is sent to it, so we do not have to guess what could be happening in the background. Also, keep in mind that these rewrite rules could be used in conjunction, or you may have to come up with your own combination to work with your previous setup.

Rewrite Rules for Flat Files or Rewrite Rules that Appear as Flat Files

This rewrite rule is probably one of the easiest to start and to work with because Apache sees only what is being passed so we can match against the file name completely to get exact matches.

Scenario

In this setup, we have these URLs to match against:

Recent Entries

Site Migration Series (3 of 5)
How to Migrate your Website

Site Migration Series (2 of 5)
How to Migrate your Website

Site Migration Series (1 of 5)
How to Migrate your Website

Use Google Page Speed to speedtest your website.
Use Google Page Speed to check the speed of your website, focusing on DNS and other common issues

ModX Ditto RSS - Wrong Copyright Year
How to correct the copyright year in ModX's Ditto RSS Feed Builder

Archives

 

Recent Work

View our work portfolio

Learn about us

Discover Adroit Technologies

Our Services

Services matching your needs

Read our blog

Follow our latest news