Skip to content

Instantly share code, notes, and snippets.

@hereswhatidid hereswhatidid/web.config
Last active Dec 20, 2015

What would you like to do?
Web.config for enabling Roots WordPress theme URL rewrites
<?xml version="1.0" encoding="UTF-8"?>
<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 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 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 name="Roots Rewrite Plugins" stopProcessing="true">
<match url="^plugins/(.*)" ignoreCase="false" />
<action type="Rewrite" url="/wp-content/plugins/{R:1}" appendQueryString="true" />
<rule name="WordPress Rewrite" patternSyntax="Wildcard">
<match url="*" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<action type="Rewrite" url="index.php" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.