Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > HTML Programming

Unregistered, Check out the Coder Battles in the Announcement and Game forums.

HTML Programming Forum discussion covering HTML, XHTML, DHTML and all flavors of HTML. Hypertext Markup Language is used to create websites.

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-28-2006, 07:58 PM
Dan Dan is offline
Programmer
 
Join Date: Jun 2006
Posts: 145
Credits: 0
Rep Power: 9
Dan is on a distinguished road
Default The Ultimate HTML/xHTML/DHTML 301 direct/forwarding thread!

If you don't know what a HTML/xHTML/DHTML 301 redirect is, you will by the end of this thread! If you need to redirect a page, unfortunately it isn't as simple as using one of the various methods - only the 301 redirect will preserve search engine rankings for the page. It is the most efficient, search engine friendly method for website redirection - the code 301 is interpreted as "moved permanently".

Here is how to perform a 301 redirect in the 3 afformentioned coding languages:

HTML, xHTML, DHTML:
  1. Create a .htaccess file by opening up notepad, or a similair text/txt editor and save the file as .htaccess with no extension.
  2. Place this code in your .htaccess file:

    Code:
    redirect 301 /old/old.htm http://www.yoursite.com/new.htm
    OR, if you are redirecting to a new url, you need the following code:

    Code:
    redirect 301 / http://www.yoursite.com/new.htm
    If you already have one of these files - make sure you leave a line before adding the code!

  3. Save the file and upload to your server root folder.


  4. Test the redirect works by visiting the old page - you should automatically be redirected!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!

Sponsored Links
Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
thread problem dirkfirst C# Programming 9 01-15-2007 09:19 AM
The Ultimate ASP/ASP.net 301 direct/forwarding thread! Dan ASP, ASP.NET and Coldfusion 3 01-08-2007 02:33 PM
The Ultimate PHP 301 direct/forwarding thread! Dan PHP Forum 6 07-08-2006 03:16 PM
The ultimate xHTML / DHTML / HTML 301 redirection thread! Dan HTML Programming 5 07-04-2006 05:57 PM
The Ultimate Codefusion 301 direct/forwarding thread! Dan ASP, ASP.NET and Coldfusion 0 06-28-2006 08:28 PM


All times are GMT -5. The time now is 08:26 PM.

Contest Stats

Xav ........ 1322.18
MeTh0Dz|Reb0rn ........ 1053.7
morefood2001 ........ 879.43
John ........ 877.37
marwex89 ........ 869.98
WingedPanther ........ 830.24
Brandon W ........ 735.07
chili5 ........ 309.39
Steve.L ........ 236.23
dcs ........ 216.02

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 82%

Ads