Response headers using RewriteProxy directive

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 12
Joined: 17 Aug 2015, 09:37

Response headers using RewriteProxy directive

04 May 2017, 12:59

Hi,

I have a question about using the RewriteProxy directive.

I'm using something like the following
RewriteProxy ^/([A-Za-z0-9\-]+)/$ http://myotherwebsite.com/$1/ [H]

The above seems to work for me - in that it returns the content that I'd want to see.
The only problem is the response headers.

I'm seeing the response headers from the remote server from as well.
So I'm getting a response with duplicate fields. e.g.

X-Powered-By:ASP.NET
X-Powered-By:PHP/7.0.15

Question is - how do I remove/suppress the remote site headers from my page response headers?

All the best,

Matt

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Response headers using RewriteProxy directive

09 May 2017, 08:35

Hello.

Unfortunately, ISAPI_Rewrite does not provide means to alter response headers. However, Helicon Ape can be used for that purpose. For example, mod_headers can do this: https://www.helicontech.com/ape/doc/mod_headers.htm
If you decide to upgrade to Helicon Ape, you don't have to purchase upgrade immediately as Ape comes with 45-day trial period. Also since Ape include the proxy function as well and reads the same configuration file (.htaccess) it is not recommended to have both Ape and ISAPI_Rewrite enabled on the same website.

User avatar
Posts: 12
Joined: 17 Aug 2015, 09:37

Re: Response headers using RewriteProxy directive

16 May 2017, 12:29

Hi Yaroslav,

No worries. Thanks for the response. I'll reconsider my problem; we may go the Helicon Ape route!

Thanks and all the best,

Matt

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 7 guests