Advertisement
Guest User

WP IIS web.config rewriting rules - Croque-pixel.com

a guest
Sep 11th, 2014
234
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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=""
  7. path="/index.php?error=404"
  8. responseMode="ExecuteURL" />
  9. </httpErrors>
  10. <rewrite>
  11. <rules>
  12. <rule name="WordPress Rule 1" stopProcessing="true">
  13. <match url="^index\.php$" ignoreCase="false" />
  14. <action type="None" />
  15. </rule>
  16. <rule name="WordPress Rule 2" stopProcessing="true">
  17. <match url="^([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false" />
  18. <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" />
  19. </rule>
  20. <rule name="WordPress Rule 3" stopProcessing="true">
  21. <match url="^([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false" />
  22. <action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent" />
  23. </rule>
  24. <rule name="WordPress Rule 4" stopProcessing="true">
  25. <match url="^" ignoreCase="false" />
  26. <conditions logicalGrouping="MatchAny">
  27. <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
  28. <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
  29. </conditions>
  30. <action type="None" />
  31. </rule>
  32. <rule name="WordPress Rule 5" stopProcessing="true">
  33. <match url="^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)" ignoreCase="false" />
  34. <action type="Rewrite" url="{R:2}" />
  35. </rule>
  36. <rule name="WordPress Rule 6" stopProcessing="true">
  37. <match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
  38. <action type="Rewrite" url="{R:2}" />
  39. </rule>
  40. <rule name="WordPress Rule 7" stopProcessing="true">
  41. <match url="." ignoreCase="false" />
  42. <action type="Rewrite" url="index.php" />
  43. </rule>
  44. </rules>
  45. </rewrite>
  46. </system.webServer>
  47. </configuration>
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement