diff options
Diffstat (limited to 'pollutometer-php/web.config')
-rw-r--r-- | pollutometer-php/web.config | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/pollutometer-php/web.config b/pollutometer-php/web.config new file mode 100644 index 0000000..a46cca3 --- /dev/null +++ b/pollutometer-php/web.config @@ -0,0 +1,35 @@ +<configuration> + <system.webServer> + <rewrite> + <rules> + <clear /> + <rule name="BlockAccessToPublic" patternSyntax="Wildcard" stopProcessing="true"> + <match url="*" /> + <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> + <add input="{URL}" pattern="/web/*" /> + </conditions> + <action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied." /> + </rule> + <rule name="RewriteAssetsToPublic" stopProcessing="true"> + <match url="^(.*)(\.css|\.js|\.jpg|\.png|\.gif|\.ico)$" /> + <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> + </conditions> + <action type="Rewrite" url="web/{R:0}" /> + </rule> + <rule name="RewriteRequestsToPublic" stopProcessing="true"> + <match url="^(.*)$" /> + <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> + </conditions> + <action type="Rewrite" url="web/app.php/{R:0}" /> + </rule> + <rule name="Redirect to https"> + <match url="(.*)"/> + <conditions> + <add input="{HTTPS}" pattern="Off"/> + </conditions> + <action type="Redirect" url="https://{HTTP_HOST}/{R:1}"/> + </rule> + </rules> + </rewrite> + </system.webServer> +</configuration> |