Browse Source

Added web.config files

tags/v1.1^2
Teknikode 5 years ago
parent
commit
04659ee6c2
16 changed files with 386 additions and 0 deletions
  1. 9
    0
      about/web.config
  2. 45
    0
      api/web.config
  3. 33
    0
      blog/web.config
  4. 9
    0
      contact/web.config
  5. 33
    0
      errors/web.config
  6. 40
    0
      git/web.config
  7. 9
    0
      help/web.config
  8. 21
    0
      home/web.config
  9. 32
    0
      paste/web.config
  10. 17
    0
      podcast/web.config
  11. 20
    0
      ricehalla/web.config
  12. 25
    0
      rss/web.config
  13. 17
    0
      stats/web.config
  14. 20
    0
      templates/web.config
  15. 36
    0
      upload/web.config
  16. 20
    0
      web.config

+ 9
- 0
about/web.config View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" path="http://error.teknik.io/404" responseMode="Redirect" />
</httpErrors>
</system.webServer>
</configuration>

+ 45
- 0
api/web.config View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/errors/api_404.php" responseMode="ExecuteURL" />
</httpErrors>
<rewrite>
<rules>
<rule name="RedirectUserFriendlyURL1" stopProcessing="true">
<match url="^api\.php$" />
<conditions>
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^component=([^=&amp;]+)&amp;action=([^=&amp;]+)$" />
</conditions>
<action type="Redirect" url="{C:1}/{C:2}" appendQueryString="false" />
</rule>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)/([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="api.php?component={R:1}&amp;action={R:2}" />
</rule>
<rule name="RedirectUserFriendlyURL2" stopProcessing="true">
<match url="^api\.php$" />
<conditions>
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^component=([^=&amp;]+)$" />
</conditions>
<action type="Redirect" url="{C:1}" appendQueryString="false" />
</rule>
<rule name="RewriteUserFriendlyURL2" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="api.php?component={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

+ 33
- 0
blog/web.config View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RedirectUserFriendlyURL1" stopProcessing="true">
<match url="^index\.php$" />
<conditions>
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^author=([^=&amp;]+)$" />
</conditions>
<action type="Redirect" url="{C:1}" appendQueryString="false" />
</rule>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?author={R:1}" />
</rule>
<rule name="RewriteUserFriendlyURL2" stopProcessing="true">
<match url="^([^/]+)/([0-9^/]+){1,}?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="view_post.php?post={R:2}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

+ 9
- 0
contact/web.config View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="http://error.teknik.io/404" responseMode="Redirect" />
</httpErrors>
</system.webServer>
</configuration>

+ 33
- 0
errors/web.config View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<outboundRules>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?error={R:1}" />
</rule>
</rules>
</rewrite>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="http://error.teknik.io/404" responseMode="Redirect" />
</httpErrors>
<defaultDocument>
<files>
<add value="404.php" />
</files>
</defaultDocument>
</system.webServer>
</configuration>

+ 40
- 0
git/web.config View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="UserRepositories" enabled="true" stopProcessing="false">
<match url="^/?u/([^/]+)/?(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?user={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 1" enabled="true" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{UNENCODED_URL}" pattern="^/?u/([^/]+)(.*)?$" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="false" />
</rule>
</rules>
<outboundRules>
<preConditions>
<preCondition name="isUserSpecific">
<add input="{REQUEST_URI}" pattern="^/u/([^/]+)(.*)$" />
</preCondition>
<preCondition name="isHTML">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" ignoreCase="false" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="http://error.teknik.io/404" responseMode="Redirect" />
</httpErrors>
</system.webServer>
</configuration>

+ 9
- 0
help/web.config View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="http://error.teknik.io/404" responseMode="Redirect" />
</httpErrors>
</system.webServer>
</configuration>

+ 21
- 0
home/web.config View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="profile.php?id={R:1}" />
</rule>
</rules>
</rewrite>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="http://error.teknik.io/404" responseMode="Redirect" />
</httpErrors>
</system.webServer>
</configuration>

+ 32
- 0
paste/web.config View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="?paste={R:1}" />
</rule>
</rules>
<outboundRules>
<rule name="OutboundRewriteUserFriendlyURL1" preCondition="ResponseIsHtml1" enabled="false">
<match filterByTags="A, Form, Img" pattern="^(.*/)\?paste=([^=&amp;]+)$" />
<action type="Rewrite" value="{R:1}/{R:2}/" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="http://error.teknik.io/404" responseMode="Redirect" />
</httpErrors>
</system.webServer>
</configuration>

+ 17
- 0
podcast/web.config View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="view_post.php?post={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

+ 20
- 0
ricehalla/web.config View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="view_desktop" stopProcessing="true">
<match url="^([0-9]+)$" />
<action type="Rewrite" url="view_image.php?id={R:1}" appendQueryString="false" />
<conditions>
<add input="{REQUEST_URI}" pattern="(.+)" />
</conditions>
</rule>
</rules>
</rewrite>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="http://error.teknik.io/404" responseMode="Redirect" />
</httpErrors>
</system.webServer>
</configuration>

+ 25
- 0
rss/web.config View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)/([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?content={R:1}&amp;author={R:2}" />
</rule>
<rule name="RewriteUserFriendlyURL2" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?content={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

+ 17
- 0
stats/web.config View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?disp=dymatic" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

+ 20
- 0
templates/web.config View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" />
</staticContent>
<caching>
<profiles>
<add extension=".js" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:00:30" />
<add extension=".css" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:00:30" />
</profiles>
</caching>
<httpProtocol>
<customHeaders>
<add name="access-control-allow-origin" value="*" />
<add name="access-control-allow-headers" value="content-type" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

+ 36
- 0
upload/web.config View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="View File" enabled="true" stopProcessing="true">
<match url="^([a-zA-Z0-9]+)[\.]([^/]+)[^/]$" ignoreCase="false" />
<action type="Rewrite" url="/lib/download.php?file={C:1}" appendQueryString="false" logRewrittenUrl="false" />
<conditions>
<add input="{REQUEST_URI}" pattern="(.+)" />
</conditions>
</rule>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([a-zA-Z0-9]+)[\.]([^/]+)/([a-zA-Z0-9]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="delete_upload.php?file={R:1}.{R:2}&amp;hash={R:3}" />
</rule>
</rules>
</rewrite>
<staticContent>
<mimeMap fileExtension=".*" mimeType="application/octet-stream" />
</staticContent>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="100000000" />
</requestFiltering>
</security>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="http://error.teknik.io/404" responseMode="Redirect" />
</httpErrors>
</system.webServer>
</configuration>

+ 20
- 0
web.config View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RedirectDefaultPage" enabled="true" stopProcessing="true">
<match url="^(.+)$" negate="true" />
<action type="Redirect" url="home/" />
</rule>
<rule name="RewriteSubMainURL" enabled="false" stopProcessing="false">
<match url="^([^/]+)/(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="{R:2}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Loading…
Cancel
Save