.htaccess redirect and cloak site2

Discussion in 'Apache' started by AWyer, Feb 13, 2007.

  1. #1
    Hi

    I'm trying to use a forum on my site2 becuase I have a spare mysql database with this host. The company hosting my site1 does not have a database.

    I do not want the clients from site1 knowing the address of site 2.

    Is my code correct?

    RewriteEngine on
    rewritecond %{REQUEST_URI} www.site1.com/forum
    rewriterule (.*) http://www.site2.com/forum$1 [l,nc]

    Kind regards

    AWyer
     
    AWyer, Feb 13, 2007 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    There's nothing you can do about them not knowing. The URL in the link will be site 1, and after they are redirected, they will see site 2 in the URL.

    And you use [R=301,L] instead of [l,nc] for redirects.
     
    Nintendo, Feb 13, 2007 IP