SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member QD9's Avatar
    Join Date
    Jun 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Whats the point in redirection pages!?

    Sometimes a site, when you click on a link it will take you to a page called this:

    www.website.com/redir.php?URL=www.website2.com

    Which automatically forwards you to website 2...

    What is the point in these and how do they work?

    I assume its just a function like this?

    Code:
    <?php $URL = $_GET['URL'];
    print "<meta http-equiv=\"refresh\" content=\"0;URL=" . $URL . "\">";
    ?>

  2. #2
    SitePoint Zealot milenko1054's Avatar
    Join Date
    Jan 2004
    Location
    Ohio
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Typically redirections are used to either track outgoing traffic or to hide affiliate links. To implement a redirect using your example:

    Code:
      header("location:$URL");


  3. #3
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    In the blogosphere
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its also used to prevent double posting Since you lost the post variables once you leave the page.
    bLueFrogX's Blog - Random Ramblings of a NEET Techie ★

  4. #4
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Or to Avoid long web address

    Another use for redirection. Sometimes domain addresses like one I am working on are very long. My project happens to be several layers into a university system. A group I work with has secured a four character domain address we can redirect to the longer one. This makes it easy to advertise our site, giving out an easy address for people to remember.

  5. #5
    SitePoint Wizard
    Join Date
    Mar 2007
    Posts
    1,211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think some redirects do not pass Pr also.

  6. #6
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    UK
    Posts
    539
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you block the redirect php page with robots.txt, then theoretically SE robots won't go to the redirected page (extra measure on top of nofollow tag perhaps?

  7. #7
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Just an addon to milenko's post - It's good for storing clicks in a database, etc.
    For example, if you advertise on your site on a CPC basis, you can keep an accurate measure of the clicks, therefore charging your ad-client the right amount.
    Also, if you want to track links to categories of sites, you will know which sites are the most popular with your visitors, allowing you to adjust your content to please the users, without them having to actually send you data (e.g. rating or questionnaire).

    It can also allow people to study how to make the most cost-effecive ads. If a few of the most-clicked ads have a few things in common, use it yourself.

    Hope That Helps,
    Jake Arkinstall
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona


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
  •