SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Skills to Pay the Bills Sparkie's Avatar
    Join Date
    Jul 1999
    Location
    A cave with 47 computers and an internet feed
    Posts
    3,559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    I was wondering if someone could point me to a script that will redirect from a page to an address on a new server when a link is clicked?

    Thanks
    Sparkie

    ------------------
    Leave Your Mark!
    www.pawsitronic.com


    Your one-stop web design solution!


  2. #2
    SitePoint Addict
    Join Date
    Feb 2000
    Location
    District of Columbia
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this what you need?

    <meta http-equiv="refresh" content="0;URL=http://newserver">

    in the head of the document.

  3. #3
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am unclear of what you are asking. Do you want to know how to create a hyper-link that takes you from one page to another when clicked or how to automatically redirect someone who goes to one page and the is forwarded to another?

    Westmich

  4. #4
    Destiny Manager Plebius's Avatar
    Join Date
    Nov 1999
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do I get this right.. you moved your site and want to redirect people to the new location?

    That can be accomplished with a .htaccess file.

    -------- .htaccess file ------------

    Redirect 301 / http://www.newsite.com/


    ------------------
    Martin - Plebius Press - An independent media network
    includes javascript, perl, humor, news and more.

  5. #5
    Skills to Pay the Bills Sparkie's Avatar
    Join Date
    Jul 1999
    Location
    A cave with 47 computers and an internet feed
    Posts
    3,559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think its the meta-refresh tag.. The code that will take you from a page on one server to a page on a different server, without clicking a link.

    You see them on sites that have moved and say "You will be automatically redirected in X seconds.." but I suppose its possible to have 0 seconds so there is no extra load time.

  6. #6
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a couple warnings about the meta-tag. I don't believe the older browsers recoganize the tag and some search engines will not index redirect pages.

    You may be better off just to put a link.

    IMHO,
    Westmich

  7. #7
    SitePoint Member
    Join Date
    Jul 1999
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <HTML>
    <HEAD>
    <SCRIPT LANGUAGE="javascript">
    <!--HIDE
    var timer = null
    function move() {
    window.location='http://www.my_new_location.com/index.html'
    }
    //STOP HIDING-->
    </SCRIPT></HEAD>
    <BODY onload=move()>
    </BODY><//HTML>

    Html code that will work every time (as long as java is enabled ofcourse)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •