Commit:    821797c70745d4e8e2a91473ec71431871a9b950
Author:    Anatol Belski <a...@php.net>         Sun, 13 Jan 2019 19:41:41 +0100
Parents:   c4f0c07a4ad8fcc370a637478c485353fe0bb3bc
Branches:  master

Link:       
http://git.php.net/?p=web/windows.git;a=commitdiff;h=821797c70745d4e8e2a91473ec71431871a9b950

Log:
Add web.config templates

Changed paths:
  A  templates/web.config.redirect.tpl
  A  templates/web.config.tpl


Diff:
diff --git a/templates/web.config.redirect.tpl 
b/templates/web.config.redirect.tpl
new file mode 100644
index 0000000..b8d972b
--- /dev/null
+++ b/templates/web.config.redirect.tpl
@@ -0,0 +1,4 @@
+                <rule name="Rewrite latest REAL_FILENAME" 
stopProcessing="true">
+                    <match url="^downloads/releases/FAKE_FILENAME$" />
+                    <action type="Redirect" 
url="/downloads/releases/REAL_FILENAME" appendQueryString="false" 
redirectType="Temporary" />
+                </rule>
diff --git a/templates/web.config.tpl b/templates/web.config.tpl
new file mode 100644
index 0000000..e433e47
--- /dev/null
+++ b/templates/web.config.tpl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- !!! This file is generated. Explore one of the following for changes
+       - include/listing.php
+       - templates/web.config.tpl
+       - templates/web.config.redirect.tpl
+ -->
+<configuration>
+    <system.webServer>
+        <rewrite>
+            <rules>
+                <clear />
+                               <!--  redirect all traffic from http to https 
-->
+                <rule name="Redirect to https" enabled="true" 
stopProcessing="true">
+                    <match url=".*" />
+                    <conditions>
+                        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
+                    </conditions>
+                    <action type="Redirect" 
url="https://{HTTP_HOST}{REQUEST_URI}"; redirectType="Permanent" 
appendQueryString="false" />
+                </rule>
+                               <!--  redirect traffic from empty user agents 
to prevent bandwidth flooding -->
+                <rule name="Rewrite Empty User-Agent" stopProcessing="true">
+                    <match url="^downloads/.*$" />
+                    <conditions>
+                        <add input="{HTTP_USER_AGENT}" pattern="^$" />
+                    </conditions>
+                    <action type="Rewrite" url="/user-agent.txt" />
+                </rule>
+                               <!--  redirects for windows.php.net main site 
-->
+                <rule name="Rewrite /download/" stopProcessing="true">
+                    <match url="^download/?$" />
+                    <action type="Rewrite" url="/listing.php?mode=release" 
appendQueryString="false" />
+                </rule>
+                <rule name="Rewrite /qa/" stopProcessing="true">
+                    <match url="^qa/?$" />
+                    <action type="Rewrite" url="/listing.php?mode=qa" 
appendQueryString="false" />
+                </rule>
+                <rule name="Rewrite /snaps/" stopProcessing="true">
+                    <match url="^snaps/?$" />
+                    <action type="Rewrite" url="/listing.php?mode=snaps" 
appendQueryString="false" />
+                </rule>
+                <rule name="Rewrite /snapshots/" stopProcessing="true">
+                    <match url="^snapshots/?$" />
+                    <action type="Rewrite" url="/snapshot.html" 
appendQueryString="false" />
+                </rule>
+                <rule name="Rewrite /team/" stopProcessing="true">
+                    <match url="^team/?$" />
+                    <action type="Rewrite" url="/team.php" 
appendQueryString="false" />
+                </rule>
+
+               <!-- Autogenerated part start  -->
+               RELEASES_REDIRECT_TO_LATEST_PLACEHOLDER
+               <!-- Autogenerated part end  -->
+            </rules>
+        </rewrite>
+    </system.webServer>
+</configuration>


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to