Skip to content

Instantly share code, notes, and snippets.

@justinph
Created January 22, 2014 19:36
Show Gist options
  • Save justinph/8565809 to your computer and use it in GitHub Desktop.
Save justinph/8565809 to your computer and use it in GitHub Desktop.
mprnews mod_rewrite example
RewriteEngine On
# Allows our static assets to be versioned
# javascript (js) is versioned seperately because it has a more complicated build process
# also create a shortcut path /a/ for static assets because it uses less characters
RewriteRule ^js-built/([0-9]+)/(.*)$ /js-built/$2 [L]
RewriteRule ^a/([0-9]+)/(.*)$ /assets/$2 [L]
RewriteRule ^assets/([0-9]+)/(.*)$ /assets/$2 [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment