Question about htaccess

Discussion in 'White Hat SEO' started by mpsheng, May 5, 2011.

  1. mpsheng

    mpsheng Newbie

    Joined:
    Apr 13, 2010
    Messages:
    46
    Likes Received:
    5
    I hope someone can help me with these questions. Thanks in advance for reading!

    1. My CMS can automatically create http://www.example.com/content.php?sid=282, but I want users to link to (and see) http://www.example.com/Cool-Page. I added the following line into .htaccess

    RewriteRule ^Cool-Page$ http://www.example.com/content.php?sid=282 [R=301,L]

    The problem is, whenever someone goes to /Cool-Page, the URL in the address bar still shows content.php?sid=282 instead of /Cool-Page. Is there any way to fix this in an SEO friendly matter?

    2. I have several ways to describe a single page. For example, a product might fall into 2 categories:

    http://www.example.com/Cat-1/Product.html and
    http://www.example.com/Cat-2/Product.html

    My CMS automatically creates the second Cat-2/Product.html page based on a product being added into 2 categories. Can htaccess help here to get rid of the second (duplicate content page) or should I fix the URL problem by removing the /Cat-2/Product.html directly?
     
  2. blb12

    blb12 Regular Member

    Joined:
    Aug 8, 2010
    Messages:
    276
    Likes Received:
    428
    # SEO URL Settings
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]

    I think you can do it
     
  3. orlandolongwood

    orlandolongwood Junior Member

    Joined:
    Aug 16, 2009
    Messages:
    141
    Likes Received:
    85
    Occupation:
    failed novelist
    Location:
    Austin, TX
    You didn't mention what CMS you are using - you should be able to add a canonical meta tag to one of those pages and you're golden. Just google "canonical tags" and you get loads of examples.
     
  4. mpsheng

    mpsheng Newbie

    Joined:
    Apr 13, 2010
    Messages:
    46
    Likes Received:
    5
    I have read that canonical doesn't work very well because you are still splitting the incoming links between the 2 pages.

    Although Google will "reconcile" the two pages, there is no guarantee that it won't lose some link juice during the reconciliation.
     
  5. blb12

    blb12 Regular Member

    Joined:
    Aug 8, 2010
    Messages:
    276
    Likes Received:
    428
    What is your souce Code?
     
  6. thereisacrow

    thereisacrow Newbie

    Joined:
    Apr 26, 2011
    Messages:
    11
    Likes Received:
    0
    Agreed, check that you may make these edits within the CMS.