Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.