0

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)" />
                </conditions>
                <action type="Rewrite" url="/gsoquiz/index.php/{R:1}" />

          </rule>   

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 :).

Alan Hollis
  • 181
  • 9

1 Answers1

0

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}.

Scott Forsyth
  • 16,339
  • 3
  • 36
  • 55