Results 1 to 2 of 2

Thread: Tracking dynamic .HTACCESS redirects?

  1. #1
    Join Date
    Aug 2005
    Location
    Youngstown Ohio
    Posts
    114
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Tracking dynamic .HTACCESS redirects?

    I just bought a marketing script called PHP Link Cloaker that redirects your affiliate links and tracks # of clicks and where the visitor came from. I installed it correctly twice, but for whatever reason it is not working so in the meantime I will use .HTACCESS dynamic redirecting like so:
    PHP Code:
    #BEGIN
    RewriteEngine On
    RewriteRule 
    ^recommends/google(/)?$ http://www.google.com/index.php?referid=187376353 [L]
    # END 
    The above is just an example.
    This works fine however using this method I have no way of tracking my ad campaigns, not CTR, referral, nothing, and any non-amatuer who is involved in any sort of Internet marketing knows how crucial it is to track ad metrics.

    So finally to get to my question, is there any simple php script that could count the number of hits and the referring link to maybe a text file when someone clicks one of my 'recommends' link?

    Keep in mind that using .HTACCESS redirection means that the folder 'recommends' does not ACTUALLY exist in my root level.

    Please Help
    ~Ross Vaughn
    Last edited by Snookerman; 05-09-2009 at 05:49 PM. Reason: added “Resolved” prefix

  2. #2
    Join Date
    Aug 2005
    Location
    Youngstown Ohio
    Posts
    114
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default

    Ok i have figured out a solution; I was going about it backwards,
    So I created a simple PHP redirection script based on an array of URL passed variables that tracked the number of click throughs to a database.

    Then I just go into .HTACCESS and change it to:
    PHP Code:
    #BEGIN
    RewriteEngine On
    RewriteRule 
    ^recommends/google(/)?$ http://mysite.com/redirect.php?id=google [L]
    # END 
    Last edited by Spinethetic; 05-02-2009 at 04:54 PM.

Tags for this Thread

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
  •