Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 300933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:57:33+00:00 2026-05-12T06:57:33+00:00

I work for company that links out to partners through a third party website

  • 0

I work for company that links out to partners through a third party website that tracks them. So for example on our site there will be an outgoing link something like this (names changed to protect my work):

<a href="link.php?link=chuckecheese">check it out kids!</a>

if you go into link.php, you see I define the link there:

$outlink['chuckecheese'] = "http://partners.linktrackingisprettycool.com/x/212/CD1/$STAMP";

$STAMP is a timestamp and is replaced with, say, “12-25-09-1200” for noon on christmas.

When a user clicks on this link, he goes to http://www.chuckecheese.com

This all works fine, but it isn’t as good for SEO purposes as it could be. I want to make it so that search engines will see it as a link to chuckecheese.com, which which helps our partners’ pageranks and is more honest.

I’m in .htaccess trying to make up rewrite rules but I’m confused and don’t know exactly how it’s done. I tried:

RewriteRule http://www.chuckecheese.com$ link.php?link=chuckecheese$ [QSA]

But this doesn’t seem to work. What should I try next?

Thanks in advance for any help. You guys on here are always awesome and I appreciate the part that the good people at stack overflow play in me remaining employed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:57:33+00:00Added an answer on May 12, 2026 at 6:57 am

    You can’t use a rewrite rule to redirect the user for this. The request has to be one processed by your webserver.

    You might try doing some javascript to achieve this. so the href is to chuckecheese, but onclick, you change the document.location to what you really want to do.

    Edited question for bounty

    What you could do is pre-process your links based on the user agent of the browser. So when the user-agent is googlebot (one of the below strings), You display the real url of http://www.chuckecheese.com.

    Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
    Googlebot/2.1 (+http://www.googlebot.com/bot.html)
    Googlebot/2.1 (+http://www.google.com/bot.html)
    

    When the URL is not googlebot, you display the link that does traffic analytics.

    You can find a list of user agents at the following URLs:

    • http://www.useragentstring.com/Googlebot2.1_id_71.php
    • http://www.user-agents.org/
    • http://www.pgts.com.au/pgtsj/pgtsj0208c.html

    If googlebot isn’t showing the correct user-agent (or it changes in the future) google recommends you do a reverse look up against the IP address. This will be a small performance hit.

    You can verify that a bot accessing your server really is Googlebot by using a reverse DNS look up, verifying that the name is in the googlebot.com domain, and then doing a forward DNS look up using that googlebot name. This is useful if you’re concerned that spammers or other troublemakers are accessing your site while claiming to be Googlebot. –Google

    Edited for further explanation
    Assuming you are using php, you generate the link at runtime. Here is some code I whipped up.

    function getRealURL($url)
    {
        // adjust this regex to match the pattern of your traffic analysis urls
        ereg("link=(.+)$",$url,$matches);
        if ($matches[1])
        {
            // adjust this so the urls come out correctly
            return "http://www.".$matches[1].".com";
        }
        else 
        {
            return $url;
        }
    }
    function isGoogle()
    {
        switch ($_SERVER['HTTP_USER_AGENT'])
        {
            case 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)':
            case 'Googlebot/2.1 (+http://www.googlebot.com/bot.html)':
            case 'Googlebot/2.1 (+http://www.google.com/bot.html)':
                return true;
            default:
                return false;
        }       
    }
    function showlink($url)
    {
        $trafficAnalysisUrl = getRealURL($url);
    
        if (isGoogle())
        {
            return $url;
        }
        else
        {
            return $trafficAnalysisUrl;
        }
    }
    
    
    <html>
    ...
    Come eat pizza at <a href='<?=showLink("link.php?link=chuckecheese")?>'>chuck e cheese!</a>
    ...
    </html>
    

    I doubt google would care about something like this since both links go to the same place.
    But check the TOS to be sure.
    http://www.google.com/accounts/TOS

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I work at a company that has many clients that have their own website
The company I work for is bidding on a project that will require our
I work at an eCommerce company. Our DBA recently told me that using SQL
I work for a company that offers webhosting and DNS services. We are trying
I am doing short-term contract work for a company that is trying to implement
im new to the iPhone SDK and development. I work for a company that
At the company that I work with, we often have to integrate with client’s
I’ve interned at a company that does a lot of mainframe work. Most of
I am developing a Framework for the company that I work for that they
I work for a small company with a .NET product that was acquired by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.