web.config 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3. <system.webServer>
  4. <defaultDocument>
  5. <files>
  6. <remove value="index.php" />
  7. <add value="index.php" />
  8. </files>
  9. </defaultDocument>
  10. <rewrite>
  11. <rules>
  12. <rule name="request_filename" stopProcessing="true">
  13. <match url="." ignoreCase="false" />
  14. <conditions logicalGrouping="MatchAll">
  15. <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
  16. <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
  17. </conditions>
  18. <action type="Rewrite" url="index.php" />
  19. </rule>
  20. <rule name="user_accounts" stopProcessing="true">
  21. <match url="^user/accounts/(.*)$" ignoreCase="false" />
  22. <action type="Redirect" url="error" redirectType="Permanent" />
  23. </rule>
  24. <rule name="user_config" stopProcessing="true">
  25. <match url="^user/config/(.*)$" ignoreCase="false" />
  26. <action type="Redirect" url="error" redirectType="Permanent" />
  27. </rule>
  28. <rule name="user_error_redirect" stopProcessing="true">
  29. <match url="^user/(.*)\.(txt|md|html|php|yaml|json|twig|sh|bat)$" ignoreCase="false" />
  30. <action type="Redirect" url="error" redirectType="Permanent" />
  31. </rule>
  32. <rule name="cache" stopProcessing="true">
  33. <match url="^cache/(.*)" ignoreCase="false" />
  34. <action type="Redirect" url="error" redirectType="Permanent" />
  35. </rule>
  36. <rule name="bin" stopProcessing="true">
  37. <match url="^bin/(.*)$" ignoreCase="false" />
  38. <action type="Redirect" url="error" redirectType="Permanent" />
  39. </rule>
  40. <rule name="backup" stopProcessing="true">
  41. <match url="^backup/(.*)" ignoreCase="false" />
  42. <action type="Redirect" url="error" redirectType="Permanent" />
  43. </rule>
  44. <rule name="system" stopProcessing="true">
  45. <match url="^system/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$" ignoreCase="false" />
  46. <action type="Redirect" url="error" redirectType="Permanent" />
  47. </rule>
  48. <rule name="vendor" stopProcessing="true">
  49. <match url="^vendor/(.*)$" ignoreCase="false" />
  50. <action type="Redirect" url="error" redirectType="Permanent" />
  51. </rule>
  52. </rules>
  53. </rewrite>
  54. </system.webServer>
  55. </configuration>