Rewrite .com to .com.au? Little help please...

Discussion in 'Apache' started by Kerosene, Mar 31, 2007.

  1. #1
    Kerosene, Mar 31, 2007 IP
  2. milanmk

    milanmk Well-Known Member

    Messages:
    115
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #2
    In domain.com
    In domain.com.au
     
    milanmk, Mar 31, 2007 IP
  3. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #3
    The .com is parked on the .com.au - so I only have 1 htaccess.
     
    Kerosene, Mar 31, 2007 IP
  4. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #4
    This works, but can somebody please let me know if there's a better way?
     
    Kerosene, Apr 1, 2007 IP
  5. DaiTengu

    DaiTengu Active Member

    Messages:
    49
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    75
    #5
    You could drop the $ at the end of your domains off, but other than that, it's fine.
     
    DaiTengu, Apr 1, 2007 IP
  6. milanmk

    milanmk Well-Known Member

    Messages:
    115
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #6
    RewriteCond %{HTTP_HOST} (www\.)?domain\.com(\.au)?
    RewriteRule (.*) http://www.domain.com.au/$1 [R=301,L] 
    Code (markup):
     
    milanmk, Apr 2, 2007 IP