Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6674839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:46:42+00:00 2026-05-26T03:46:42+00:00

I was stuck by a simple outbound rule, I want to modify the HTTP

  • 0

I was stuck by a simple outbound rule, I want to modify the HTTP Content-Type to application/atom+xml, if the URL exactly matches http://wayneye.com/Feeds/Atom

My rule XML:

<outboundRules>
<rule name="AtomFeedsIMEType" patternSyntax="ExactMatch">
    <match serverVariable="RESPONSE_CONTENT_TYPE" pattern="http://{HTTP_HOST}/Feeds/Atom" />
    <action type="Rewrite" value="application/atom+xml" />
</rule>

Need help…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:46:42+00:00Added an answer on May 26, 2026 at 3:46 am

    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 anything. To 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>
      <rule name="AtomFeedsIMEType" preCondition="Match atom feeds">
        <match serverVariable="RESPONSE_Content_Type" pattern="(.*)" negate="false" />
        <action type="Rewrite" value="application/atom+xml" replace="true" />
      </rule>
      <preConditions>
        <preCondition name="Match atom feeds">
          <add input="{REQUEST_URI}" pattern="^/Feeds/Atom" />
        </preCondition>
      </preConditions>
    </outboundRules>
    

    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:

    <location path="your_site_name">
      <system.webServer>
        <rewrite>
          <allowedServerVariables>
            <add name="CONTENT_TYPE" />
          </allowedServerVariables>
        </rewrite>
      </system.webServer>
    </location>
    

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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am stuck with something quite simple but really annoying: I have an xml
I'm kind of stuck with one - presumably simple to resolve problem. I want
I am stuck with a simple regex problem. What I want to do is
I'm stuck on a simple issue here. I'm building an application that manages a
I am a bit stuck implementing a rather simple layout requirement. I want to
I'm stuck with a simple task. What I want to do is to transform
I'm not very good at C, and I always get stuck on simple string
I've been stuck with this simple Sql query for last 3 hours and my
I'm stuck in having to write a simple spam filter I'm not really sure
I'm stuck on a RegEx problem that's seemingly very simple and yet I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.