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'm having difficulty having a sub folder act differently to the main domain in my web.config for iss.

I want to prevent the sub folder from rewriting to the baselevel index.php and instead re-write to /subfolder/index.php/

I've tried this

              <rule name="Remove index.php for quiz" enabled="true" stopProcessing="false">
                <match url="^(gsoquiz/)(.*)$" ignoreCase="false" trackAllCaptures="false" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{R:1}" negate="true" pattern="^(index\.php|admin\.php)" />
                <action type="Rewrite" url="/gsoquiz/index.php/{R:1}" />


But all I get is

The page cannot be displayed because an internal server error has occurred.

Any help as to where I'm going wrong would be greatly appreciated. Going mad trying to figure this out :).

share|improve this question

The part of your path after the gsoquiz/ is going to be in {R:2} rather than {R:1}. Try changing your two back-references from {R:1} to {R:2}.

share|improve this answer

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.