Go Back   Wiki NewForum | Latest Entertainment News > General Discussion


Manual Redirection: The Best Safe Bet For Redirection In HTML


Reply
Views: 1695  
Thread Tools Rate Thread
  #1  
Old 11-28-2009, 06:29 AM
bholus10 bholus10 is offline
Award Winner
 
Join Date: Nov 2009
Posts: 10,043
Default Manual Redirection: The Best Safe Bet For Redirection In HTML

Redesigning website pages may pose some problems if these pages have high search engine rankings that one doesn't want to lose.

In such cases you have to redirect your website traffic so that your original URL is retained. Among many methods, if you have a dynamically driven website (server side), you can implement one of the classical scripts, depending on which scripting language you use.

There are scripts in ASP-VB, ColdFusion, PHP, CGI/Perl,Ruby/Ruby on Rails, and Java. However, redirection can be hazardous, if care is not taken in choosing the correct method, if your website is in HTML:

Automatic 301 redirect

This HTTP code 301 is interpreted by search engine robots as moved permanently. In other words, the 301 redirect simply issues the Permanently Moved message in the HTTP header which tells the search engine to only index the target URL.

This 301 code is placed in the root folder of your server by an .htaccess file. The code in this .htaccess file is
redirect 301 /old/old.htm (or html) new/new.htm (or html)

Note that:
1. To create an .htaccess file, open notepad (or other text editor), name and save the file as .htaccess (there is no extension).
2. The first old in the statement must not be altered.
3. The second old of the statement is replaced by your URL which is to be redirected, but:
4. Do not add http://www to that URL.
5. The first new in the statement is your new URL and includes http://www.
6. The second new in the statement must not be altered.
7. You must leave a single space between redirect 301 and /old/old.htm (or html) and new/new.htm (or html).

The .htaccess file is a very powerful tool, but can cause problems on a site if not implemented correctly. Test it by typing in your browser the old address to the page you have changed.

You should be immediately taken to the new location. Because of the problems that may occur, if an error is done in preparing the .htaccess file, always save a backup copy of any existing .htaccess file before attempting any changes.

The META tag (Automatic Meta Redirect)

To implement this alternative method (file side) put the following META tag in the head of your document:

refresh content=10;
url=http://www.mynewsite.com/
>
(Where http://mynewsite.com/ is your new target URL).

Content informs the browser of the period to wait before execution of the redirection. The (=[i]10 tells the browser to wait 10 seconds before transfer.

This wait duration is not a fixed compulsory period, you may choose that the wait be for as long you would like. You may even choose it to be (=[i]0, if you wish to give a smoother transition to the redirection.

With a meta redirect the page with the redirect issues a 200 OK status and then the browser moves over to the new URL, With a 200 OK on both pages. The search engine then indexes both the start page and the target page: and that is a known spam method.

This spam method consists of setting up numerous domains full of keywords for the search engines to index. Then the META redirect takes the visitor after 0 or more seconds to the intended site.

Therefore using this method may end up by getting you penalized, although your intentions were not mean. The search engine robots, however, can't ascertain that; so you get penalized for spam and you may not be able to get your site listed again!


Last edited by bholus10; 11-28-2009 at 06:29 AM.
Reply With Quote
  #2  
Old 11-28-2009, 06:30 AM
bholus10 bholus10 is offline
Award Winner
 
Join Date: Nov 2009
Posts: 10,043
Manual Redirection - The Best Safe Bet Using The 301 Redirect:

Use the following script for the body of your HTML page:

#000000 bgcolor=#FFFFFF link=#0000EF>

Redirecting to: http://www.geocities.com/mmmkenawi/k...toolbar-1.html>http://www.geocities.com/mmmkenawi/k...toolbar-1.html

Click the URL above to complete the redirection.


The above script is redirecting the browser from the old URL (not to be included in the script) to the target URL which here is http://www.geocities.com/mmmkenawi/k...toolbar-1.html (Replace by your desired URL).
Reply With Quote
Reply

Latest News in General Discussion





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.