mod_rewrite htacccess file

Discussion in 'Programming' started by NaSh123, Jun 22, 2008.

  1. #1
    What can I put in my htaccess file so the following occurs.

    domain.com/URL1 goes to domain2.com/URL1

    domain.com/BLA/BLABLA/BLABLABLA goes to domain2.com/BLA/BLABLA/BLABLABLA

    Basically everything in the same structure goes to Domain #2 rather then Domain #1

    Thanks!
     
    NaSh123, Jun 22, 2008 IP
  2. King Goilio

    King Goilio Member

    Messages:
    200
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    33
    #2
    RewriteEngine On
    RewriteRule ^(.*) http://DOMAIN2.com/$1 [R=301]
    Code (markup):
     
    King Goilio, Jun 22, 2008 IP
  3. NaSh123

    NaSh123 Peon

    Messages:
    1,298
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you ! Works like a charm.
     
    NaSh123, Jun 22, 2008 IP