Last active
March 10, 2020 15:39
-
-
Save hereswhatidid/6066415 to your computer and use it in GitHub Desktop.
Web.config for enabling Roots WordPress theme URL rewrites
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Roots Rewrite CSS" stopProcessing="true"> | |
<match url="^assets/css/(.*)" ignoreCase="false" /> | |
<action type="Rewrite" url="/wp-content/themes/roots/assets/css/{R:1}" appendQueryString="true" /> | |
</rule> | |
<rule name="Roots Rewrite JS" stopProcessing="true"> | |
<match url="^assets/js/(.*)" ignoreCase="false" /> | |
<action type="Rewrite" url="/wp-content/themes/roots/assets/js/{R:1}" appendQueryString="true" /> | |
</rule> | |
<rule name="Roots Rewrite IMG" stopProcessing="true"> | |
<match url="^assets/img/(.*)" ignoreCase="false" /> | |
<action type="Rewrite" url="/wp-content/themes/roots/assets/img/{R:1}" appendQueryString="true" /> | |
</rule> | |
<rule name="Roots Rewrite Plugins" stopProcessing="true"> | |
<match url="^plugins/(.*)" ignoreCase="false" /> | |
<action type="Rewrite" url="/wp-content/plugins/{R:1}" appendQueryString="true" /> | |
</rule> | |
<rule name="WordPress Rewrite" patternSyntax="Wildcard"> | |
<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" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment