Customize HTTP header in IIS URL Rewrite module?

You are matching the server variable against the full URL, including domain name. That's not going to work ;-). It doesn't really matter what the value of the Content-Type is, you're going to replace it anyway so you can match is against URL1 make sure you don't replace it on every page, you need to add a precondition to match only requests starting with /Feeds/Atom (on {REQUEST_URI} ).

Here's an example: outboundRules.

You are matching the server variable against the full URL, including domain name. That's not going to work ;-). It doesn't really matter what the value of the Content-Type is, you're going to replace it anyway so you can match is against URL1 make sure you don't replace it on every page, you need to add a precondition to match only requests starting with /Feeds/Atom (on {REQUEST_URI} ).

Here's an example: For this to work, the server has to be set up to allow changing of the Content-Type header. This can be done either on the server level or on the site level but needs to be done by the Administrator.It's set in the applicationHost. Config and not in the web.config.

Here is a part of the applicationHost. Config that allows that: You can also allow this from the GUI, with the View Server Variables link under actions from the main URLRewrite screen. Hope this helps.

Thank you so much for the detailed explanation! – Wayne Ye Oct 12 at 3:29 However, I still got problem! Per: learn.iis.Net/page.

Aspx/570/… HTTP_CONTENT_TYPE has been changed to RESPONSE_CONTENT_TYPE, no matter which I use, it DOESN't work (i.e. Content type doesn't change)! In fact my dev env request URI is: localhost/WayneBlog.

Web/Feeds/Atom, is the pattern "^/Feeds/Atom" correct? Please guide – Wayne Ye Oct 12 at 4:08 Yes, it's correct that you have to use RESPONSE_CONTENT_TYPE to replace the Content-Type HTTP header. That's what I did in my example.

If your request URI is different you have to change the pattern in the precondition. E.g. Pattern="ˆ/WayneBlog.

Web/Feeds/Atom" or if you want compatibility between the development and live environment you could use: pattern="/Feeds/Atom$" to match any URL ending with /Feed/Atom. – Marco Miltenburg Oct 12 at 18:37 Thanks I used Feeds/Atom and fixed:) – Wayne Ye Oct 120 at 9:03.

You can also allow this from the GUI, with the View Server Variables link under actions from the main URLRewrite screen. Hope this helps.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions