Hi Guys,
I was hoping to have some assistance with an IIS7 web.config issue I was having.
I am working on a PHP framework and wish to have most of the URL’s passed to my index.php as the PATH_INFO. I would like not to invoke my index.php if the file exists (so go direct), but I would like to protect a sub-folder which is named WEB-INF (and all the contents below it).
I currently have the web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Go direct on files and folders" stopProcessing="true">
<match url="^.*$" />
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_FILENAME}"
matchType="IsFile" pattern=""
ignoreCase="false" />
<add input="{REQUEST_FILENAME}"
matchType="IsDirectory"
pattern="" ignoreCase="false" />
</conditions>
<action type="None" />
</rule>
<rule name="Pass PHP the request PATH_INFO" stopProcessing="true">
<match url="^(.*)$" />
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
I saw a reference website: http://learn.iis.net/page.aspx/143/use-request-filtering/ which looks like it might have some of the details in it, but I am not sure which particular function to use. Is it something to do with filtering out hidden segments?
Thanks for the assistance.