RewriteRule multi subdomains doesn't work

#1
Hello,
I've setup up 3 external apps for 3 subdomains and i've used the following rewrite rule: (on example.com)

RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ http://subdomain1_ext_proxy/$1 [P,E=Proxy-Host:subdomain1.mydomain.com]
RewriteRule ^(.*)$ http://subdomain2_ext_proxy/$1 [P,E=Proxy-Host:subdomain2.mydomain.com]
RewriteRule ^(.*)$ http://subdomain3_ext_proxy/$1 [P,E=Proxy-Host:subdomain3.mydomain.com]

The problem is the the 3 subdomains redirect the the subdomain1_ext_proxy.

Any ideas ?

Thank you
 
Top