PHP Classes
elePHPant
Icontem

File: public/Web.config

Recommend this page to a friend!
  Classes of Bill Rocha  >  phatto  >  public/Web.config  >  Download  
File: public/Web.config
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: phatto
Register a service worker for PHP based PWA
Author: By
Last change:
Date: 1 year ago
Size: 2,063 bytes
 

Contents

Class file image Download
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
    <system.webServer>
        <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="HTTP to HTTPS redirect" stopProcessing="true"> 
                    <match url="(.*)" /> 
                    <conditions> 
                        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                    </conditions> 
                    <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
                </rule>

                <rule name="Rewrite to index.php" 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" />
                        <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>
        <httpErrors>
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
        </httpErrors>
    </system.webServer>
</configuration>