Skip to content

Instantly share code, notes, and snippets.

@matijs
Last active December 12, 2015 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matijs/4699626 to your computer and use it in GitHub Desktop.
Save matijs/4699626 to your computer and use it in GitHub Desktop.
Poor man's php front controller example
# mind the lowercase "on"
RewriteEngine on
# match all non existing file on the filesystem
RewriteCond %{REQUEST_FILENAME} !-f
# reroute everything that matches through index.php with `url` as the querystring
RewriteRule (.*) index.php?url=$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment