How do I set up a URL redirect?

7 replies
Figured it out.
#redirect #set #url
  • Profile picture of the author crecon
    for anyone else who wants to setup a url redirect, there are instructions at
    Internet Technologies 4 of 8 monetize your website or blog as an affiliate : iSuccess Webinars
    {{ DiscussionBoard.errors[2181982].message }}
  • Profile picture of the author JonathanKrantz
    And for anyone else who wants quick information here's how it's done in PHP:

    Code:
    <?php
    
    header("Location: yourlinkhere");
    
    ?>
    replace yourlinkhere with a URL (begin with http )
    {{ DiscussionBoard.errors[2184631].message }}
  • Profile picture of the author iampick
    For HTML refresh tag you can put this TAG before </head>
    Code:
    <meta http-equiv="Refresh" content="2;URL=http://www.destinationurl.com" />
    2 : delay time in second.
    http://www.destinationurl.com : Your destination url.

    {{ DiscussionBoard.errors[2187542].message }}
  • Profile picture of the author ucajack
    Best way to bring about a url redirect is to use .htaccess file.
    {{ DiscussionBoard.errors[2188097].message }}
  • Profile picture of the author JonathanKrantz
    I agree. It is done like this:

    put the following into the .htacces file of your hosting (if it doesn't exist, create it and put it into the root or public_html of your hosting account)

    Code:
    redirect /source.html DESTINATION
    Replace DESTINATION with desired url

    this will redirect from http : / / www . yourdomain . tld / source.html

    to http : / / www . destination . tld
    {{ DiscussionBoard.errors[2188502].message }}
  • Profile picture of the author ellistev
    Exactly what JonathanKrantz said.
    {{ DiscussionBoard.errors[2193848].message }}
  • Profile picture of the author Mr. Enthusiastic
    Originally Posted by jtwillia1 View Post

    Figured it out.
    That's nice for you, but since the purpose of a forum is to help other people too, how about posting what the problem was and what solution you discovered?

    Chris

    P.S. Moderators - URL redirects come up so often that maybe there should be a sticky post about them in this subforum?
    {{ DiscussionBoard.errors[2195188].message }}

Trending Topics