Skip to content

Instantly share code, notes, and snippets.

@pauljtbennett
Created December 3, 2012 11:14
Show Gist options
  • Select an option

  • Save pauljtbennett/4194258 to your computer and use it in GitHub Desktop.

Select an option

Save pauljtbennett/4194258 to your computer and use it in GitHub Desktop.
RewriteEngine On
RewriteBase /
# theme assets
RewriteRule ^img/([a-z]+)/(.*)$ wp-content/themes/$1/img/$2 [NC,L]
RewriteRule ^js/([a-z]+)/(.*)$ wp-content/themes/$1/js/$2 [NC,L]
RewriteRule ^css/([a-z]+)/(.*)$ wp-content/themes/$1/css/$2 [NC,L]
RewriteRule ^fonts/([a-z]+)/(.*)$ wp-content/themes/$1/fonts/$2 [NC,L]
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment