6 replies
I write articles promoting affiliate products and post them in my article directory.

I cloak the affiliate links by redirecting them through sub-folders on my site.

Under the HTML view, for some reason, the article script strips "http://thebitbot(dot)com" out of the link.

For example, "http://thebitbot(dot)com/articles/go/getresponse/" get stripped down to "/articles/go/getresponse/" rendering it useless for syndication.

Any idea how can I fix this? Is there some PHP function causing this to happen?
#php #question
  • Profile picture of the author Tim Brownlaw
    Originally Posted by thebitbotdotcom View Post

    I write articles promoting affiliate products and post them in my article directory.

    I cloak the affiliate links by redirecting them through sub-folders on my site.

    Under the HTML view, for some reason, the article script strips "http://thebitbot(dot)com" out of the link.

    For example, "http://thebitbot(dot)com/articles/go/getresponse/" get stripped down to "/articles/go/getresponse/" rendering it useless for syndication.

    Any idea how can I fix this? Is there some PHP function causing this to happen?
    There are a few ways to do this, but here is a little demo I've written that might help.

    PHP Code:
    <?php
    // Demo for relative and absolute URIs

    // This is a relative path which does not include the BASE_URI as the browser
    // adds it. Remember that it is relative to the page (URIs) it is being viewed on.
    // SO if this link displayed on a page located at http://www.mysite.com/stuff
    // the link would become http://www.mysite.com/stuff/articles/go/getresponse/
    // which can break things.
    rel_path '/articles/go/getresponse/';
    rel_link ='<a href="'.$ rel_path.'">This is an article</a>';

    // This is the hard coded version forcing the Sites URI in the link.
    // This allows the link to be displayed on any page removing any
    // doubt as to where it lives.

    // So Lets define our sites BASE_URI which can live in an include file
    // but is defined for demonstration purposes
    define('BASE_URI','http://www.mysite.com');

    absolute_path BASE_URI.$ rel_path;
    absolute_link ='<a href="'.$ absolute_path.'">This is an article</a>';
    ?>

    <?php echo $ rel_link;?>
    <br />
    <?php echo $ absolute_link;?>
    ** Note had to add a space between the $ and variable name so it would display.
    Signature

    Great Success is built from many little successes!

    http://www.timbrownlaw.com - My Wee Part of the World.

    http://www.LookingOverMyShoulder.com

    {{ DiscussionBoard.errors[3415348].message }}
  • Profile picture of the author thebitbotdotcom
    Thanks Tim! I'll definitely try it out. Much thanks for responding, friend...
    Signature
    Do Your Copywriting Skills Suck?

    Let Us Help You Develop Your Writing Skills!

    Submit Guest Posts With [ TheBitBot.Com ]
    {{ DiscussionBoard.errors[3415523].message }}
  • Profile picture of the author Tim_Myth
    On my AMS site, I place this in the HTML template:
    Code:
    Article Source: &lt;a href=&quot;http://www.dyartts.com&quot; alt=&quot;Free Reprintable Articles like &quot;&gt;Dyartt's Article Directory - &lt;/a&gt;&lt;/span&gt;
    The $Article->url variable is a relative path, so you'll have to find the references to it and add your base url in front of it.
    {{ DiscussionBoard.errors[3417674].message }}
    • Profile picture of the author thebitbotdotcom
      Originally Posted by Tim_Myth View Post

      On my AMS site, I place this in the HTML template:
      Code:
      Article Source: &lt;a href=&quot;http://www.dyartts.com&quot; alt=&quot;Free Reprintable Articles like &quot;&gt;Dyartt's Article Directory - &lt;/a&gt;&lt;/span&gt;
      The variable is a relative path, so you'll have to find the references to it and add your base url in front of it.
      I did something similar to that and it works, but for some reason, my resource URL's keep kicking out my base URL on my "Post this article to your site" page only when I am redirecting through affiliate link-subfolders that are on the site itself.

      All of my members articles resource links work just fine. Its only my links that get stripped.

      See the "Post this article to your site" link on this page and you will see what I am talking about:

      The Dangers Of Relying On Google For Traffic - TheBitBot Article and Press Release Directory

      The links in the article are fine on the article page, it is just the HTML syndication page that this happens on which sucks because I want to be able to syndicate my own articles from my own article directory with the links in tact.
      Signature
      Do Your Copywriting Skills Suck?

      Let Us Help You Develop Your Writing Skills!

      Submit Guest Posts With [ TheBitBot.Com ]
      {{ DiscussionBoard.errors[3418118].message }}
  • Profile picture of the author thebitbotdotcom
    Here is what links and only links that point to the site itself do:

    <p>Check out TheBitBot SEM Blog and Article &amp; Press Release Directory where you can learn about things like <a href="/2011/02/how-to-increase-commenting-at-your-blog/" title="How To Increase Commenting At Your Blog">how to increase commenting at your blog</a> or <a href="/2011/02/there-is-no-such-thing-as-google-bombing-right-wrong/" title="How To Google Bomb Your Competitors">how to Google bomb your competitors</a>.</p>

    This is my resource box for the above article.

    See how my base URL get stripped out?
    Signature
    Do Your Copywriting Skills Suck?

    Let Us Help You Develop Your Writing Skills!

    Submit Guest Posts With [ TheBitBot.Com ]
    {{ DiscussionBoard.errors[3418143].message }}
    • Profile picture of the author Tim Brownlaw
      Originally Posted by thebitbotdotcom View Post

      Here is what links and only links that point to the site itself do:

      <p>Check out TheBitBot SEM Blog and Article &amp; Press Release Directory where you can learn about things like <a href="/2011/02/how-to-increase-commenting-at-your-blog/" title="How To Increase Commenting At Your Blog">how to increase commenting at your blog</a> or <a href="/2011/02/there-is-no-such-thing-as-google-bombing-right-wrong/" title="How To Google Bomb Your Competitors">how to Google bomb your competitors</a>.</p>

      This is my resource box for the above article.

      See how my base URL get stripped out?
      It's not getting stripped out, it's never being put in.
      All of your article links have the same issue.

      It's relying on relative pathnames and having the browser add the base URL in. So you'd have to find where the article URLs are being generated and add it there.

      Having no idea what script you are using, I can't really offer you any further help.

      Cheers
      Tim
      Signature

      Great Success is built from many little successes!

      http://www.timbrownlaw.com - My Wee Part of the World.

      http://www.LookingOverMyShoulder.com

      {{ DiscussionBoard.errors[3438500].message }}

Trending Topics