SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    nofollow redirect & javascript link

    All links on my site redirect to another page. However everything is html except for (2) javascript links I need to direct to. Links are being done on the viewable pages in the fashion:

    HTML Code:
    <a href="ab/dir.php?GG=2200" rel="nofollow" target="_blank">link text</a>
    Going to my internal dir page, having:

    Code:
    if((isset($_GET['GG']))&&($_GET['GG']=='2200')) // 
    header("Location: http://www.affildomain.com/placeholder-11556?target=_top&mouseover=N")
    Where 'affildomain' is the javascript link. Which of course cannot be done this way or it gives the "File Download - Security Warning...Do you want to save this file, or find a program online to open it?"

    How can this be redirected (first tag above) while using nofollow or an equivalent, connecting with this javascript:
    Code:
    <script type="text/javascript" language="javascript" src="http://www.affildomain.com/placeholder-11556?target=_top&mouseover=N"></script>
    Its an affiliate link with <link>link text here</link>

    Is there a way to integrate on the redirect page the window location:
    (window.location="http://www.affildomain.com/placeholder-11556?target=_top&mouseover=N";

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,527
    Mentioned
    84 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by datadriven View Post
    Which of course cannot be done this way or it gives the "File Download - Security Warning...Do you want to save this file, or find a program online to open it?"
    I think that someone on the PHP forum may have information about how to adjust the headers to help prevent your problem.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


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
  •