Skip to content

Instantly share code, notes, and snippets.

@shadowhand
Created August 11, 2014 04:37
Show Gist options
  • Save shadowhand/1fa9647a7c3d0379f42e to your computer and use it in GitHub Desktop.
Save shadowhand/1fa9647a7c3d0379f42e to your computer and use it in GitHub Desktop.
nginx configuration for using a single file as the front controller
server {
...
location / {
try_files $uri $uri/ @missing;
}
# Rewrite 404s back to PHP
#
location @missing {
rewrite ^ /index.php last;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment