Most Read

Most Read

Setting up Team Discussion Board

SharePoint 2007 has a Team Discussion Board that is used to initiate discussion and get replies on topics of interest. This article outlines the steps required to setup a discussion board, managing...
+ Full Article

More Popular Articles

Recent Articles

Recent Articles

Repeating Excel Header Rows

If your worksheet has several pages, it will be useful to have the header row repeat in all the pages. This will improve productivity as the user need not flip to the first page to view the header...
+ Full Article

More Recent Articles
How to redirect a Web Page PDF Print
User Rating: / 1
PoorBest 
Web - Web Design

Redirecting a Web Page

What do you do when you change your residence or telephone number? Inform friends and family of the change; not to speak about the utility and credit card companies! The same applies to web pages. If you manage a personal website or a commercial one, managing links is a crucial task.

The web page referenced by a link might have been moved to a different location or the page might have been updated and referenced by a new file name. In such cases users will be unable to reach the right page. If you had submitted your web page to search engines, the old information will still be out there on the web resulting in Page Not Found errors.

Methods

There are several methods by which you can redirect a web page to a new location. For example, you can use JavaScript, Meta tags, VB Script and other scripting languages, .htaccess etc. This article outlines two of the methods.
  • A simple way to redirect users to your new location is by using META tag functionality. Place the following tag in the HEAD section of your html page that is to be redirected:

<meta http-equiv="refresh" content="20;url=http://www.foo.com/newpage.htm">
In the above example 20 denotes the time in seconds before the page gets refreshed to the new location. The new location is denoted by the URL variable.

  • Another common method of redirecting is to use .htaccess. Open the existing .htaccess using a text editor or create a new one if no .htaccess is available. To create a new one, open a blank page in a text editor such as notepad or textpad and save it as .htaccess. Use 'Redirect' syntax to redirect your site visitors to the new page.

For example, let us assume that http://www.foo.com/install.htm has been moved to http://www.foo.com/content/install.htm. To redirect, enter the following line in your .htaccess

Redirect /install.htm http://www.foo.com/content/install.htm (OR)
redirectpermanent /install.htm http://www.foo.com/content/install.htm

The second option makes the client know that the Redirect is permanent while the first option implies a temporary one. The permanent directive is preferred to preserve the existing search engine rankings for that page. The new URL is displayed in the browser and the visitors are unaware that the url has changed. As always, it is a good practice to backup the existing .htaccess before editing as a wrongly configured .htaccess may not even display the web pages.

Related Reading

For related reading on this subject, refer to articles on Persistent Uniform Resource Locator or PURL
Trackback(0)
Comments (0)add
Write comment

security image
Write the displayed characters


busy
Last Updated on Saturday, 03 November 2007 10:00
 

now browsing!

We have 20 guests online

Training

UPK Training

UPK Developer Training Course Description  Overview Understanding Developer menu and toolbar itemsSetting Developer PreferencesManaging FoldersManaging DocumentsCreating Views
+ Full Article

More on Training

Featured

Driving Licence Agencies in Canada

New to Canada or moving within Canada. Below mentioned are links to Licensing agencies that will be of use.  Ontario: Getting an Ontario Driver's Licence Alberta: Alberta Driver's Licence...
+ Full Article

More Featured Articles

Sharepoint

Create a Data View using SP Designer

Using Sharepoint Designer one can create a custom data view that can get data from several sources such as web services, xml data, database queries, and Sharepoint Lists. The view populates the data...
+ Full Article

More on Sharepoint

Windows

Windows XP Task Scheduler

Windows XP Scheduler is a graphical tool that allows you to schedule any program or script to run at a specified time. You can choose to run the program daily, weekly, or monthly basis or one time...
+ Full Article

More on Windows
 

Sedo - Buy and Sell Domain Names and Websites project info: referpages.com Statistics for project referpages.com etracker® web controlling instead of log file analysis