1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help rewriting URL with htaccess

Discussion in 'White Hat SEO' started by MikeLac, Feb 17, 2011.

  1. MikeLac

    MikeLac Regular Member

    Joined:
    Apr 9, 2010
    Messages:
    245
    Likes Received:
    141
    Location:
    Canada
    I made a noob mistake with a blog that I created the other day. I was testing Adsense ads placement BEFORE I put my relevant content up. So, the adsense ads that are showing up on my Homepage are totally irrelevant. They are about Wordpress stuff and some Google ad credit ads. When I create a post, the ads are relevant on the post page. I realize that I'll have to wait until the Adsense bot rescans my home page before I will see relevant ads. I thought this was done every day. But I now hear that it could take up to 2 weeks.

    The ads are relevant when I add /?my-keyword-phrase at the end of the url.

    I'm getting 700 uniques a day since I set the blog up 4 days ago. Most of the traffic is coming from 100 Twitter accounts. People just visiting the profile page and clicking my website link.

    For each Twitter Account, I created a Tinyurl link that goes to the home page. This way, I don't have 100 Accounts with the exact same link.

    tinyurl dot com/Word1 redirects to mysite dot com/?Word1
    tinyurl dot com/Word2 redirects to mysite dot com/?Word2

    etc ..... up to 50. The "Word" part is the same for all 50 links. Just the number changes (1-50)

    tinyurl dot com/Different-Word1 redirects to mysite dot com/?Different-Word1
    tinyurl dot com/Different-Word2 redirects to mysite.com/?Different-Word2

    etc ... The "Different-Word" part is the same for all 50 links. Just the number changes (1 to 50).

    Here is what I'd like to do.

    Using htaccess (or if you have any better ideas):

    Detect those incoming links from Tinyurl and rewrite the URL so the URL will be mysite dot com/?my-desired-adsense-phrase.

    Here is my current htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress


    If I could do that, then I can get relevant adsense ads showing right away instead of waiting for the adsense bot to show up again. After a couple of weeks, then I'll change the htaccess file back to what is shown above. By that time, the adsense bot should have rescanned my Home page.

    Or am I making things too complicated and there is a much simpler way that will make me slap myself upside the head and say "DOH!" for not seeing it. :D
     
    Last edited: Feb 17, 2011
  2. MikeLac

    MikeLac Regular Member

    Joined:
    Apr 9, 2010
    Messages:
    245
    Likes Received:
    141
    Location:
    Canada
    I created new adsense ad units and replaced the adsense code on my blog.

    Started to show relevant ads. Now it is back to showing irrelevant ads that has to do with Wordpress keywords.
     
    Last edited: Feb 17, 2011