Инструменты пользователя

Инструменты сайта


Action disabled: source
programming:iis-rewrite-rule-htaccess-codeigniter

IIS 7 rewrite rule for CodeIgniter

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Rewrite to index.php">
                    <match url="index.php|robots.txt|templates|data|test.php" />
                    <action type="None" />
                </rule>                
                <rule name="Deny access to system directory" stopProcessing="true">
                <match url="^(.*)$" ignoreCase="false" />
                <conditions>
                    <add input="{URL}" pattern="^system.*" ignoreCase="false" />
                </conditions>
                <action type="Rewrite" url="/index.php?/{R:1}" appendQueryString="false" />
                </rule>
                <rule name="Deny access to application directory" stopProcessing="true">
                <match url="^(.*)$" ignoreCase="false" />
                <conditions>
                    <add input="{URL}" pattern="^application.*" ignoreCase="false" />
                </conditions>
                <action type="Rewrite" url="/index.php?/{R:1}" appendQueryString="false" />
                </rule>
                <rule name="Convert missing files to look up CodeIgniter controller " stopProcessing="true">
                <match url="^(.*)$" ignoreCase="false" />
                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                </conditions>
                <action type="Rewrite" url="index.php?/{R:1}" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>
programming/iis-rewrite-rule-htaccess-codeigniter.txt · Последнее изменение: 2017/03/27 11:28 — artur

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki