Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up Redmine as a subdirectory of our department's intranet site, and also to rebrand it as "Workflow" using IIS's URL Rewrite extension.

I have it "working" in that it will serve the page with all the correct rewrites in both the URL and the HTML code. However, when I try to submit a form (including logging in to redmine), IIS gives me one of the the following errors:

Your browser sent a request that this server could not understand.


The specified CGI application encountered an error and the server terminated the process.

Here's the setup:

  • Redmine installed on a local Windows XP machine using the Bitnami all-in-one installer, which includes:
    • Apache 2
    • Ruby-on-Rails
    • MySQL
    • Redmine
    • Thin
  • Redmine runs locally at http:/localhost/redmine
  • Redmine runs over the intranet http:/
  • Windows Server + IIS 7.5 serving up an ASP.NET intranet web application
  • IIS Extensions Url Rewrite and AAR installed
  • Reverse proxy settings for IIS (shown below) to serve Redmine at

        <rule name="Route requests for workflow to redmine server" stopProcessing="true">
            <match url="^workflow/?(.*)" />
                <add input="{CACHE_URL}" pattern="^(https?)://" />
            <action type="Rewrite" url="{C:1}://{R:1}" logRewrittenUrl="true" />
                <set name="HTTP_ACCEPT_ENCODING" value="" /> 
                <set name="ORIGINAL_HOST" value="{HTTP_HOST}" /> 
    <outboundRules rewriteBeforeCache="true">
        <clear />
            <preCondition name="isHTML" logicalGrouping="MatchAny">
                <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/plain" />
                <add input="{RESPONSE_CONTENT_TYPE}" pattern="^application/.*xml" />
            <preCondition name="isRedirection">
                <add input="{RESPONSE_STATUS}" pattern="3\d\d" />
        <rule name="Rewrite outbound relative URLs in tags" preCondition="isHTML">
            <match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="^/redmine/(.*)" />
            <action type="Rewrite" value="/workflow/{R:1}" />
        <rule name="Rewrite outbound absolute URLs in tags" preCondition="isHTML">
            <match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="^(https?)://*)" />
            <action type="Rewrite" value="{R:1}://{R:2}" />
        <rule name="Rewrite tags with hypenated properties missed by IIS bug" preCondition="isHTML"> <!-- -->
             <match filterByTags="None" customTags="" pattern="(\baction=&quot;|\bsrc=&quot;|\bhref=&quot;)/redmine/(.*?)(&quot;)" />
            <conditions logicalGrouping="MatchAll" trackAllCaptures="true" />
            <action type="Rewrite" value="{R:1}/workflow/{R:2}{R:3}" />
        <rule name="Rewrite Location Header" preCondition="isRedirection">
            <match serverVariable="RESPONSE_LOCATION" pattern="^http://[^/]+/(.*)" />
                <add input="{ORIGINAL_URL}" pattern=".+" />
                <add input="{URL}" pattern="^/(workflow|redmine)/.*" />
            <action type="Rewrite" value="http://{ORIGINAL_URL}/{C:1}/{R:1}" />
<urlCompression dynamicCompressionBeforeCache="false" />

Any help that you can provide would be appreciated. I get the impression that I'm close adn that it is just one little setting here or there, but I can't seem to make it work.

share|improve this question

I realize that it may be a little late, but have you checked the box to "append query string" for the inbound rule in IIS Manager? I had a lot of strange problems until I realized that I had un-checked this box (on the advice of some blog). Checking it seemed to sort things out for me (running Redmine 2.3.3 behind IIS 7 configured as reverse proxy).

share|improve this answer
I'll give it a try. I ended up abandoning this for now simply because I could not get it working and the friendly URL was a "nice to have". – dneaster3 Oct 22 '13 at 14:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.