.htaccess and URL redirects when changing domain name and URL structure!

Discussion in 'Apache' started by datatrond, Nov 7, 2008.

  1. #1
    datatrond, Nov 7, 2008 IP
  2. evera

    evera Peon

    Messages:
    283
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    From
    aktivfritid-shop.no/kategori.asp?maingroup=02%20Tredem%C3%B8ller&bid=1
    to
    aktivshop.no/epages/Aktiv_Fritid.sf/secdVupgoGRCSs/?ObjectPath=/Shops/Aktiv_Fritid/Categories/10/100
    is not possible and makes no sense, where do you get these variables: Aktiv_Fritid.sf/secdVupgoGRCSs/?ObjectPath= ?????

    Possible is something like this with mod_rewrite.
    http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

    From
    http://www.aktivfritid-shop.no/kategori.asp?maingroup=02 Tredemøller&bid=1
    to
    http://www.aktivfritid-shop.no/maingroup/02 Tredemøller/bid/1.html

    RewriteEngine On
    RewriteRule ^maingroup/([^/]*)/bid/([^/]*)\.html$ /kategori.asp?maingroup=$1&bid=$2 [L]
    
    Code (markup):
    maybe that helped
     
    evera, Nov 10, 2008 IP