Response headers using RewriteProxy directive
3 posts
• Page 1 of 1
- mattrewrite
- Posts: 12
- Joined: 17 Aug 2015, 09:37
Response headers using RewriteProxy directive
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
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
Re: Response headers using RewriteProxy directive
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.
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.
- mattrewrite
- Posts: 12
- Joined: 17 Aug 2015, 09:37
Re: Response headers using RewriteProxy directive
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
No worries. Thanks for the response. I'll reconsider my problem; we may go the Helicon Ape route!
Thanks and all the best,
Matt
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests