mod_rewrite question

Discussion in 'Google' started by vastbeyond, Jan 24, 2007.

  1. #1
    Ok, so I just need a bit of guidance. I am pretty sure that I have come up with the correct solution, but since this is hard to fix once I establish it (and, there are not many resources that I could find for this type of issue), I wanted to kindly ask your two cents on the matter.

    The issue I have is that I want sites to link to and give PageRank to my main index.php page while at the same time being able to customize its look and feel with PHP variables.

    The solution that I have come up with is to have a site have a link like <a href=http://www.mysite.com/index.php?ref=908>Link to My Site</a> on their website.

    On my index.php, I will have a PHP script which gets the variables from the query string and stores them in cookie. Then, I will use mod_rewrite with a conditional to say essentially "if there is a query string after index.php, then issue a 301 permanent redirect to index.php." Then, using Javascript (onLoad?) in the code of index.php, I will use the variables stored in cookies to change the look and feel of the page AND take away the google advertisements that would normally be there.

    So, my question to you is--think that a googlebot spider would see this as being multiple pages (and give me a duplicate content penalty), or just the same page?
     
    vastbeyond, Jan 24, 2007 IP
  2. emitind

    emitind Peon

    Messages:
    567
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Why not just set the link up as a mod_rewrite.

    ie: http://www.mysite.com/r/908 ---> http://www.mysite.com/index.php?ref=908

    Google would not see that as duplicate content and it saves all the messy code on the target page.

    EDIT: I overlooked that you want to add weight to the index page specifically. Um... I think Google sees index.php?VAR=X as a separate page anyway with it's own pagerank.
     
    emitind, Jan 25, 2007 IP
  3. thegypsy

    thegypsy Peon

    Messages:
    1,348
    Likes Received:
    109
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Duplicate content? Sounds more a risk of them thinking it's cloaking if anything
     
    thegypsy, Jan 25, 2007 IP