301 redirection from .jhtm to .aspx

Discussion in 'Search Engine Optimization' started by zan15, Sep 25, 2009.

  1. #1
    I am in process of changing a site to .net. At present the site is designed in java. Already 500+ pages have already been indexed by search engine. Now I need to find a solution to redirect the old .jhtm pages to .aspx.

    Any views? Please help!
     
    zan15, Sep 25, 2009 IP
  2. Canonical

    Canonical Well-Known Member

    Messages:
    2,223
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    110
    #2
    If your hosted on an Apache web server you likely have access to Mod Rewrite. If you are hosted on Apache AND the ONLY thing that changed in your URL is the file extension then adding the following to the bottom of your .htaccess in the root folder of your web should work:

    RewriteRule ^(.*).jhtm$ http://www.example.com/$1.aspx [R=301,L]
     
    Canonical, Sep 25, 2009 IP