by Adie
21 replies
I noticed most websites trying to hide affiliate links uses redirection URL like this one:

"domain.net/go/Free_Gift_Cards/4/"

In doing this, should I create a "go" folder and create blank files and then redirect each individual files to specific links? I don't really understand how to do this with less work.
Thank you very much for your suggestions..
#redirect #url
  • Profile picture of the author ndesoo
    if you using php, you can try this code:

    if ($_GET['short_url'] == 'your_short_url') {
    header("location: $url_destination");
    }

    you can save this code in file go.php
    and you can access this by yourdomain.com/go.php?short_url=your_short_url

    if you want to yourdomain.com/go/your_shot_url
    you must create the .htaccess file to configure it.
    {{ DiscussionBoard.errors[6460837].message }}
  • Profile picture of the author Adie
    I tried the first suggestion but it looks like its not working...
    Signature



    Moderator's Note: You're only allowed to put your own products or sites in your signature.

    Signature edited.
    {{ DiscussionBoard.errors[6462327].message }}
  • Profile picture of the author Janet Sawyer
    Hi Aidie,

    There is an excellent tutorial on how to do this on this web site.
    PHP Affiliate Jump Script - How to create an Affiliate Link jump script in PHP

    I've used it in the past and it works great. Don't forget to download the source code from that page.
    {{ DiscussionBoard.errors[6462396].message }}
  • Profile picture of the author ZapoTeX
    Php is simpler than doing it with .htaccess, but with htaccess you can hide the actual url with a "rewrite" command.

    Ciao!
    {{ DiscussionBoard.errors[6463660].message }}
    • Profile picture of the author Adie
      Originally Posted by ZapoTeX View Post

      Php is simpler than doing it with .htaccess, but with htaccess you can hide the actual url with a "rewrite" command.

      Ciao!
      Can you post the complete details on how to do it?
      Thank you
      Signature



      Moderator's Note: You're only allowed to put your own products or sites in your signature.

      Signature edited.
      {{ DiscussionBoard.errors[6466655].message }}
  • Profile picture of the author seokid
    It depends what programming language you are using , if you are using php then you can use header("Location:url")
    {{ DiscussionBoard.errors[6467549].message }}
  • Profile picture of the author sailcorp
    You need to instruct the server you are hosting your website on to redirect the traffic seamlessly. To do this you need to first establish what type of server your website is hosted on.
    {{ DiscussionBoard.errors[6468320].message }}
  • Profile picture of the author Tom Albas
    ColdFusion Redirect

    <.cfheader statuscode="301" statustext="Moved permanently">
    <.cfheader name="Location" value="http://www.new-url.com">

    PHP Redirect

    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.new-url.com" );
    ?>

    ASP Redirect

    <%@ Language=VBScript %>
    <%
    Response.Status="301 Moved Permanently"
    Response.AddHeader "Location","http://www.new-url.com/"
    %>

    ASP .NET Redirect

    <script runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    {
    Response.Status = "301 Moved Permanently";
    Response.AddHeader("Location","http://www.new-url.com");
    }
    </script>

    JSP (Java) Redirect

    <%
    response.setStatus(301);
    response.setHeader( "Location", "http://www.new-url.com/" );
    response.setHeader( "Connection", "close" );
    %>

    CGI PERL Redirect

    $q = new CGI;
    print $q->redirect("http://www.new-url.com/");

    Ruby on Rails Redirect

    def old_action
    headers["Status"] = "301 Moved Permanently"
    redirect_to "http://www.new-url.com/"
    end
    {{ DiscussionBoard.errors[6468372].message }}
  • Profile picture of the author Chelam
    You can create a method for flexible usage and then call it in a page from where you like to be redirected from to your selected page for example:
    function movePage($num,$url){
    static $http = array (
    100 => "HTTP/1.1 100 Continue",
    303 => "HTTP/1.1 303 See Other",
    304 => "HTTP/1.1 304 Not Modified",
    305 => "HTTP/1.1 305 Use Proxy",
    504 => "HTTP/1.1 504 Gateway Time-out"
    );
    header($http[$num]);
    header ("Location: $url");
    }

    movePage(303,"yoururl.com");
    {{ DiscussionBoard.errors[6469164].message }}
  • Profile picture of the author peter786110
    This is really good information thank you for share with us.
    Signature

    WebIntel provides its services to develop a unique web sites and perth web design globally.

    {{ DiscussionBoard.errors[6469515].message }}
  • Profile picture of the author contentwriting360
    Banned
    This looks good! We've been also trying to find some instructions on how to do the same. Never expected we'll find an answer over here. Thanks much!

    -Andrew
    Customer Service Representative
    Content Writing 360° - Writing Services
    {{ DiscussionBoard.errors[6472977].message }}
  • Profile picture of the author anna14
    using htaccess its possible so try it
    {{ DiscussionBoard.errors[6474971].message }}
  • Profile picture of the author CPAGodFather
    <meta http-equiv="refresh" content="0;URL='http://newsite.com/'">

    Using a client side redirect. The '0' denotes that it waits 0 seconds before redirecting.
    {{ DiscussionBoard.errors[6496846].message }}
    • Profile picture of the author dippo
      if struggling, try running on wordpress, they have plugins to do this automatically
      {{ DiscussionBoard.errors[6497435].message }}
  • Profile picture of the author botninja
    Easiest thing to do (I have done this and its up and going within minutes) is grab a copy of YOURLS (yourls.org).

    It is a bit like bit.ly - you can use keywords as the redirect name and then see stats on the link.

    Its a good one to look at to solve what you are looking at.
    Signature
    Need something automated? Take a look at The Bot Shop
    {{ DiscussionBoard.errors[6500700].message }}
  • Profile picture of the author gowthamgutha
    SEO Ultimate plugin for WordPress if you run a WordPress blog!

    SEO by Yoast might also help
    {{ DiscussionBoard.errors[7257218].message }}
  • Profile picture of the author idreesfarooq
    you can use redirect plugin or Gopages wordpress plugin for this purpose if you are having wordpress plugin. In other case, you can use header redirect for this purpose..
    Signature

    Check out for more strategies on my website www.marketingwithidrees.com

    {{ DiscussionBoard.errors[7257240].message }}
  • Profile picture of the author Dong Lee
    There is a wordpress plugin for that purpose. Are you using wp?
    {{ DiscussionBoard.errors[7257272].message }}

Trending Topics