Redirecting Dynamic URL To Static

Discussion in 'Apache' started by fundl, Jul 1, 2009.

  1. #1
    I have cms whose blogpost looks like
    www.example.com/2009/08/06/example.html
    Code (markup):
    and they are configured in .htaccess for following request
    Now somehow google has indexed the dynamic version of URL that looks like
    www.example.com/?subaction=showfull&year=2009&month=08&day=06&news_name=example
    Code (markup):
    Now i want to redirect that long URL to the previous one i.e.
    www.example.com/2009/08/06/example.html
    Code (markup):
    This is because to prevent google to see same content in both URL'S as i stated google has indexed the dynamic one but my URL Structure/Sitemap Uses the static one and i can't change it.

    Any help will be appreciated!
     
    fundl, Jul 1, 2009 IP
  2. lektrikpuke

    lektrikpuke Well-Known Member

    Messages:
    297
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    113
    #2
    Use a 301 redirect (google 301 redirect). Also, I would suggest using robots.txt to tell google not to index dynamic pages.
     
    lektrikpuke, Jul 1, 2009 IP