Skip to content

Instantly share code, notes, and snippets.

@holms
Created November 20, 2012 07:51
Show Gist options
  • Save holms/4116638 to your computer and use it in GitHub Desktop.
Save holms/4116638 to your computer and use it in GitHub Desktop.
Nginx rules for cakephp
# If the file exists as a static file serve it
# directly without running all
# the other rewite tests on it
if (-f $request_filename) {
break;
}
if (!-f $request_filename) {
rewrite ^/(.+)$ /index.php?url=$1 last;
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment