views:

1237

answers:

1

Hello Everybody

Does anyone know whether it is possible to make rewrite rules which use the proxying [P] directive, as shown below, to behave like ProxyPass used in conjunction with ProxyPreserveHost Off.

In other words I want the server on mydomain.net to see a request for mydomain.net not mydomain.com.

RewriteCond  %{HTTP_HOST} ^mydomain.com$  [NC]
RewriteRule ^/(.*)$  http://mydomain.net/app1/$1 [P,L]


Thanks and best regards,

A: 

Since [P] actually uses mod_proxy, I'd try setting ProxyPreserveHost off and seeing if that does it.

chaos
Hi! I'm using this inside a .htaccess file (shared hosting account) so I can't use server level configuaration options.Thanks
leftbrainlogic
Ah. Then no, you can't do it.
chaos