HTML Page Redirection Options

HTML Page Redirection Options

HTML page redirection options are ways in which a web page can link to another page or direct a different web page to appear. Links, images, programming and timing can all be used to direct a web page to scroll down, load a new page, open a new browser window, or play music or a video.

HTML Page Redirection

    The HTML redirection method is the safest for maintaining search engine rankings and also the easiest to create. It inserts a time element and page location as an HTML instruction when the web page starts to open. Here is the code to place between the and tags: "4" is the number of seconds, which can be between "0" and "5"; "pagename,htm" is replaced with the URL of the page that you want to appear.

    (Other head section tags--Title, Description, Keywords, etc.)

301 Redirect Page Redirection

    The simplest HTML redirection option is the 301 redirect. The 301 redirect tells the browser that the page has moved and automatically connects to the new page URL. The simplest way to implement a 301 redirect is through IIS (Internet Information Services). IIS is Microsoft's creation for Microsoft Windows.

    Right click on the file or folder you want to redirect.

    Select the radio button labeled "a redirection to a URL".

    Enter the exact URL of the page name that will appear.

    Check "The exact URL entered above" and "A permanent redirection for this resource".

    Click "Apply."

PHP Page Redirection

    PHP (or Hypertext Preprocessor) is the most widely used programming language because it is open source. PHP executes the redirect precisely. Change the code on the redirect page by replacing "yoursite.com/new_page.html" with the URL of the page you want to appear. Place the code between the and closing head tags:

    header( 'Location: http://www.yoursite.com/new_page.html' ) ;

    ?>

JavaScript Page Redirection

    The JavaScript method is the most commonly used when the page to be redirected should not be seen. JavaScript redirects automatically, causing a new page to load before an old page appears. Place the JavaScript between the tags at the top of the HTML script, so that it runs as soon as the old page is addressed. Replace "pagename,htm" with the name of the page that you want to appear; here is the code:

    any remaining head section tags (Title, Description, Keywords)

Blog Archive