The Web Development Blog has moved to http://www.heidicool.com/blog/. Please visit me there to read the latest entries and to update your bookmarks and RSS feeds.
March 04, 2005
If a page on your site has moved, or your whole site for that matter, you will need to redirect your visitors automatically to a new page. Use this meta refresh to send them to the "new" page...
It's done with a "refresh" command using one of the META tags. Here is the piece of code you need to insert in the HEAD of your old page:
< META HTTP-EQUIV="refresh" content="0;URL=http://www.youraddress.edu/yourpage.htm">
Include anything in the BODY of the page if you choose. This is optional... if you choose 0 in the above example, no one will see it anyway. See below for more on this...
The content=" " command does two things. It tells the browser how many seconds to wait before executing the refresh, (the 0 here means zero seconds. If you want to, put in a number like 5 which will give the visitor enough time to read a message.) and then the url you want them to be redirected to.
Watch out for the correct placement of the quotes!. You're used to seeing the quotes around the url, but in this case, the quote marks are around the entire content=" " command, not around the number of seconds or url individually. They are separated by a single semicolon (;).
Of course, you are allowed to write whatever you need in your BODY section. In fact, it's a good idea to put some kind of message like this in case you have a user with an older browser. You should add a manual link to the new page inside the body section of your page:
< META HTTP-EQUIV="refresh" content="5;URL=http://www.youraddress.edu/yourpage.htm">
Then in the BODY tag, a simple text message similar to this:
This page has moved. If your browser does not automatically redirect you in a few seconds, click here to go to the new page.
Remember to change your bookmark, so you can find us!
As you can see from the example above, This message serves another purpose; it reminds the user to "bookmark" the new address.
One more detail, you might want to consider renaming the page something like:
< TITLE >We've moved!< /TITLE >
Hope this helps!
Posted by: Kevin Adams March 4, 2005 11:48 AM | Category: Tips and Tricks
TrackbacksTrackback URL for this entry is: URL Redirect
Office of Marketing and Communications