web.config

web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
    <system.webServer>
        <security>
            <requestFiltering>
                <fileExtensions>
                    <add fileExtension=".sql" allowed="false" />
                    <add fileExtension=".pl" allowed="false" />
                </fileExtensions>
            </requestFiltering>
        </security>
        <directoryBrowse enabled="true" />
        <caching>
            <profiles>
                <add extension=".php" policy="DisableCache" kernelCachePolicy="DisableCache" />
                <add extension=".html" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="14:00:00:00" />
            </profiles>
        </caching>
        <rewrite>
            <rules>
                <rule name="WWW-redirect" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^www\.site\.ru$" />
                    </conditions>
                    <action type="Redirect" redirectType="Permanent" url="http://site.ru/{R:1}" />
                </rule>
                <rule name="php files" stopProcessing="true">
                    <match url="^(.*).php$" ignoreCase="false" />
                    <conditions>
                        <add input="{URL}" pattern="^/captcha.php$" ignoreCase="false" negate="true" />
                        <add input="{URL}" pattern="^/admin/lib/common/kcfinder/" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="CustomResponse" statusCode="403" subStatusCode="0"
                        statusReason="Forbidden"
                        statusDescription="Access is forbidden." />
                </rule>
                <rule name="Admin redirect" stopProcessing="true">
                    <match url="^admin/(.*)$" ignoreCase="false" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="admin/index.php?q={R:1}" appendQueryString="true" />
                </rule>
                <rule name="Site redirect" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
        <defaultDocument>
            <files>
                <remove value="index.php" />
                <add value="index.php" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>
Печать/экспорт