If you have pages in your non-WordPress site that will no longer be used, or pages that have been moved to a new location, the following steps describe how you can automatically redirect users to new pages.

One option is to add a meta redirect tag to each of your old pages. In your HTML code within each page, insert the meta tag immediately after the <head> tag, for example:

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>

<meta http-equiv=”refresh” content=”0; URL=/webcentral/learning/html/basics/document-description.html”>

The content=”0; attribute in that meta tag specifies how many seconds to wait before redirecting the user. Since it is set to 0, the user would be directed immediately. To display the page for a short amount of time, telling users that the page has moved, and to update their bookmarks or favorites, change content=”0; to content=”5; or content=”10;, for five seconds, or ten seconds, respectively.

Another option is to add a file named index.asis to the folder containing your old web site. Using the index.asis file would allow you to redirect users that browse to your home page only. If users have bookmarks or favorites to other pages within your site (other than the home page), or if they have followed links to other pages within your site, then the index.asis file would not redirect them.

Please note that the file must be named index.asis for it to work properly. A common error is to accidentally append .txt or .html to the end of the file name, so that it reads index.asis.txt, or index.asis.html. To properly create an index.asis file using Dreamweaver, you must first configure Dreamweaver accordingly.

Inside your index.asis file, the very first line should read Status: 301, the second line should read Location: followed by the web address that you want to redirect to, and you must also have two blank lines for the third and fourth lines, for example:

Status: 301
Location: http://www.bu.edu/webcentral/

It is especially important that Status:301, etc., be on their own lines. If you have not configured Dreamweaverhttp://www.bu.edu/tech/services/comm/websites/www/non-wordpress/start/dreamweaver/ to set your line breaks as LF (UNIX), even if you put Status: 301 on its own line, and you enter two blank lines after the Location: line, the index.asis file may not work correctly. Also, if you find that you cannot open the index.asis file using Dreamweaver, then you will need to set your preferences so that you can open .asis files with Dreamweaver.

In addition, add a custom error page,http://www.bu.edu/tech/services/comm/websites/www/non-wordpress/management/custom-error/ so that if users browse to a page that no longer exists, rather than getting the standard “file not found” message, they would get a custom page that you have made, where you can give them a message telling them where the site has moved.

To create a custom error page, make a folder within your site named error. This folder must be in the top folder of your web site, and the file name must be 404.html.