Skip to content

Instantly share code, notes, and snippets.

@tristanlj
Created September 7, 2011 11:03
Show Gist options
  • Save tristanlj/1200297 to your computer and use it in GitHub Desktop.
Save tristanlj/1200297 to your computer and use it in GitHub Desktop.
#Zeus webserver version of basic Wordpress mod_rewrite rules
map path into SCRATCH:path from %{URL}
match URL into $ with ^index\.php$
if matched set URL= -
match URL into $ with ^css/(.*)
if matched set URL= /wp-content/themes/roots/css/$1
match URL into $ with ^js/(.*)
if matched set URL= /wp-content/themes/roots/js/$1
match URL into $ with ^img/(.*)
if matched set URL= /wp-content/themes/roots/img/$1
match URL into $ with ^plugins/(.*)
if matched set URL= /wp-content/themes/plugins/$1
match URL into $ with ^css/adapt/(.*)
if matched set URL= /wp-content/themes/roots/css/adapt/$1
look for file at %{SCRATCH:path}
if exists then goto END
look for dir at %{SCRATCH:path}
if exists then goto END
##### FIX FOR LOGIN/FORGOTTEN PASSWORD/ADMIN ETC #####
match URL into $ with ^/wp-.*$
if matched then goto END
set URL = /index.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment