Maybe I am missing something but the code in the wiki for rewriting
URLs in IIS7 did not work for me.  I've been working all night on and
off and finally came up with this (I am an Apache guy and this is my
first rodeo with IIS URL rewriting):


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
         <rewrite>
            <rules>
                                <rule name="To Default" stopProcessing="false">
                                        <match url="^$" ignoreCase="false" />
                                        <action type="Rewrite" url="appdir/" 
logRewrittenUrl="true"  />
                                </rule>

                                <rule name="Get regular files" 
stopProcessing="false">
                                        <match url="(.*)" ignoreCase="false" />
                                        <action type="Rewrite" 
url="appdir/{R:1}"
logRewrittenUrl="true"  />
                                </rule>

                                <rule name="Go to Cake PHP" 
stopProcessing="true">
                                        <match url="appdir/(.*)$" 
ignoreCase="false" />
                                        <conditions logicalGrouping="MatchAll">
                                                <add input="{REQUEST_FILENAME}" 
matchType="IsDirectory"
negate="true" />
                                                <add input="{REQUEST_FILENAME}" 
matchType="IsFile"
negate="true" />
                                        </conditions>
                                        <action type="Rewrite" 
url="index.php?url={R:1}"
appendQueryString="true" logRewrittenUrl="true"  />
                                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

I think this is the right configuration.  Can someone else using using
IIS7 and URL Rewriting 2.0 verify that this works?  The problem with
the sample on the web site is that it doesn't correctly access images
and css.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to