Friday, December 21, 2012

CakePHP 2.2.2 and IIS 8

Hi,
after I spend serveral hours getting CakePHP to Work on IIS 8, I thought I could publish my web.conifg file. Maybe it works also on IIS 7 and so on.
Merry Christmas.
Florian

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Importierte Regel 0" stopProcessing="true">
                    <match url="^(img|css|files|js)(.*)$" />
                    <action type="Rewrite" url="/app/webroot/{R:1}{R:2}" appendQueryString="false" />
                </rule>
                <rule name="Importierte Regel 1" stopProcessing="false">
                    <match url="^$" ignoreCase="true" />
                    <action type="Rewrite" url="app/webroot/" />
                </rule>
                <rule name="Importierte Regel 2" stopProcessing="true">
                    <match url="(.*)" ignoreCase="true" />
                    <action type="Rewrite" url="app/webroot/index.php" />
                </rule>
                <rule name="Importierte Regel 3" stopProcessing="true">
                    <match url="^$" ignoreCase="false" />
                    <action type="Rewrite" url="app/webroot/" />
                </rule>
                <rule name="Importierte Regel 4" stopProcessing="true">
                    <match url="(.*)" ignoreCase="false" />
                    <action type="Rewrite" url="app/webroot/{R:1}" />
                </rule>
                <rule name="Importierte Regel 5" stopProcessing="true">
                    <match url="^app/webroot/$" ignoreCase="false" />
                    <action type="Rewrite" url="app/webroot/" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    </conditions>
                </rule>
                <rule name="Importierte Regel 6" stopProcessing="true">
                    <match url="(.*)" ignoreCase="false" />
                    <action type="Rewrite" url="app/webroot/{R:1}" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>





--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: