title: Redirect Soap request with apache
body: <p>Excuse my for my English, I’m French.</p>
  
  <p>I have a question about soap request redirection with apache (on wampserver).</p>
  
  <p>I have one file <code>server.php</code> on <code>localhost:3511</code></p>
  
  <p><strong>vhost :</strong></p>
  
  <pre><code>&lt;VirtualHost *:3511&gt;
  DocumentRoot "C:/wamp/www/test/server.php"
  ServerName test.local
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p><strong>server.php :</strong></p>
  
  <pre><code>&lt;?php
  ini_set('soap.wsdl_cache_enabled', 0);
  require_once('Test.php');
  
  $wsdl = "CurrencyConvertor.asmx.wsdl";
  $server = new SoapServer($wsdl);
  $server-&gt;setClass("Test");
  $server-&gt;handle();
  ?&gt;
  </code></pre>
  
  <p>My class <strong>Test.php :</strong></p>
  
  <pre><code>&lt;?php
  class Test
  {
      public function ConversionRate($p_conversion_rate_request)
      {   
  
          return array('ConversionRateResult' =&gt; 0);
      }
  }
  </code></pre>
  
  <p>With SoapUi, I have this result when I call</p>
  
  <pre><code>http://localhost:3511
  
  
  &lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"     xmlns:ns1="http://www.webserviceX.NET/"&gt;
      &lt;SOAP-ENV:Body&gt;
        &lt;ns1:ConversionRateResponse&gt;
           &lt;ns1:ConversionRateResult&gt;0&lt;/ns1:ConversionRateResult&gt;
        &lt;/ns1:ConversionRateResponse&gt;
      &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>So it works!</p>
  
  <p>Now I want to redirect request to </p>
  
  <pre><code>http://localhost/test2/server.php 
  </code></pre>
  
  <p>when soapui call localhost:3511.
  I have the same project in <code>localhost/test2/</code> but <code>ConversionRateResult</code> returns <code>1</code> instead of <code>0</code>.</p>
  
  <p>I have made an htaccess in <code>localhost/test/</code> with this code :</p>
  
  <pre><code>Redirect / http://localhost/test2/server.php
  </code></pre>
  
  <p>When I test this url <code>localhost:3511</code> in a web browser, <code>test2/server.php</code> is called. It works but when I call <code>localhost:3511</code> with SoapUi, nothing was returned.</p>
  
  <p>Can you explain me what’s wrong with my htaccess?
  May be I must add something?</p>