Teknik is a suite of services with attractive and functional interfaces. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

web.config 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3. <system.webServer>
  4. <httpErrors>
  5. <remove statusCode="404" subStatusCode="-1" />
  6. <error statusCode="404" prefixLanguageFilePath="" path="/errors/api_404.php" responseMode="ExecuteURL" />
  7. </httpErrors>
  8. <rewrite>
  9. <rules>
  10. <rule name="RedirectUserFriendlyURL1" stopProcessing="true">
  11. <match url="^api\.php$" />
  12. <conditions>
  13. <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
  14. <add input="{QUERY_STRING}" pattern="^component=([^=&amp;]+)&amp;action=([^=&amp;]+)$" />
  15. </conditions>
  16. <action type="Redirect" url="{C:1}/{C:2}" appendQueryString="false" />
  17. </rule>
  18. <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
  19. <match url="^([^/]+)/([^/]+)/?$" />
  20. <conditions>
  21. <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  22. <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  23. </conditions>
  24. <action type="Rewrite" url="api.php?component={R:1}&amp;action={R:2}" />
  25. </rule>
  26. <rule name="RedirectUserFriendlyURL2" stopProcessing="true">
  27. <match url="^api\.php$" />
  28. <conditions>
  29. <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
  30. <add input="{QUERY_STRING}" pattern="^component=([^=&amp;]+)$" />
  31. </conditions>
  32. <action type="Redirect" url="{C:1}" appendQueryString="false" />
  33. </rule>
  34. <rule name="RewriteUserFriendlyURL2" stopProcessing="true">
  35. <match url="^([^/]+)/?$" />
  36. <conditions>
  37. <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  38. <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  39. </conditions>
  40. <action type="Rewrite" url="api.php?component={R:1}" />
  41. </rule>
  42. </rules>
  43. </rewrite>
  44. </system.webServer>
  45. </configuration>