1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

help sending a request to a different server

Discussion in 'Apache' started by spizzuto, Dec 13, 2011.

  1. #1
    I have a public server and a secure server for reporting, etc. I receive the request on the Linux server and need to send it to a windows server if the request is for a report on the windows server.

    I have the following code in .htaccess

    RewriteCond %{REQUEST_URI} ^/forms/R\.asp$ [NC]
    RewriteRule ^(.*)/(.*)$ http://servicecheck.net/$1/$2%1 [L,R]
    note: Incoming URL is http://servicecheck.net/forms/R.asp?S=1051&B=1615&D=081011-081011&R=16284&P22=O

    RewriteCond %{REQUEST_URI} ^/mysc.asp$ [NC]
    RewriteRule ^(.*)$ http://64.213.197.19/$1 [L,R=301]
    Note: http://servicecheck.net/mysc.asp

    The first rule send the request back to itself. That is my problem.
    I need it to go to the windows server as the second one does but I need to maintain the domain name."
     
    spizzuto, Dec 13, 2011 IP
  2. elicitservers

    elicitservers Peon

    Messages:
    714
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    0
    #2
    You could try using a ProxyPass from within the Apache config, should solve the issue I believe.
     
    elicitservers, Jan 10, 2012 IP
  3. spizzuto

    spizzuto Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the response. I did use ProxyPass as follows:
    ProxyPass / https://www.servicecheck.net/
    ProxyPassReverse / https://www.servicecheck.net/
    for https and RewiteRules in .htaccess for http request that are for the Windows server as
    follows:
    RewriteCond %{REQUEST_URI} ^/(.*).asp$ [NC]
    RewriteRule ^(.*)$ https://www.servicecheck.net/$1 [L,R]
     
    spizzuto, Jan 10, 2012 IP