Redirecting web pages
Posted by davidnewcomb on 17 Jan 2009 in Techie
If you move a web page to a new location on your server you don’t want to create broken links. To make sure your web site still fits together you can create page place holders that redirect visitors to a different location. This will give you time to change the related pages to point to the new location. You must also spare a thought for all those pages on other web sites that point to your old page.
There are 2 ways this can be achieved. HTML has the advantage of allowing you to include an accompanying page to display first and then after a given time period redirecting the visitor to the new location. You may want to explain to your visitor why you are redirecting them before you send them on their way.
<HTML><HEAD>
<META HTTP-EQUIV="refresh" CONTENT="3;URL=http://www.bigsoft.co.uk/">
</HEAD<BODY>Our name has changed</BODY></HTML>
The CONTENT
contains 2 parts. The time in seconds is followed by a URL
to redirect them to.
The second method is via some kind of programming language like PHP.
<?php
header("Location: http://www.bigsoft.co.uk/");
?>
This method works slightly differently, because it injects a Location
directive into the HTTP response, where as the META
tag is interpreted by the browser to do the redirect.No feedback yet
Form is loading...