301 rewrite between different servers - Apache N00by

Discussion in 'Apache' started by marc_oc, Mar 25, 2010.

  1. #1
    I have an application hosted on server 123.456.789.0

    all my traffic goes into that machine first. I have a static site there.
    I want one of the links to point to a dynamic site on server

    123.456.789.1

    folder //apps/test

    I tried something like this

    <Proxy balancer://apps/test>
      # I did try to use the ip below instead of the cname/arecord
      # BalancerMember http://123.456.789.1:80
      BalancerMember http://box2.domainname.com:80
    </Proxy>
    
    # link on the static site is www.domainname.com/test
    RewriteCond %{REQUEST_URI} ^/test 
    RewriteRule ^/(.*)$ balancer://apps/test%{REQUEST_URI} [P,QSA,L]
    Code (markup):
    but after restarting the server and typing
    www.domainname.com/test in the url I get the 404 error
     
    marc_oc, Mar 25, 2010 IP
  2. marc_oc

    marc_oc Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    nothing here??

    Basically what I want to do is...

    My domain is poiting to my server A

    www.domainname.com => ip 123.456.789.0

    I have a cname/arecord poining to my server B

    test.domainname.com => ip 123.456.789.1

    I want my link on www.domainname.com/test to go to my app on test.domainname.com


    Thanks again
     
    marc_oc, Mar 29, 2010 IP