Skip to content

Instantly share code, notes, and snippets.

@fnkr
Created May 12, 2016 09:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fnkr/f965de82e6326eab4fbbb797d1dce0d3 to your computer and use it in GitHub Desktop.
Save fnkr/f965de82e6326eab4fbbb797d1dce0d3 to your computer and use it in GitHub Desktop.
Nginx configuration for Kirby A) in domain's root directory (e.g. example.com) B) in subdirectory named /kirbycms/ (e.g. example.com/kirbycms/).
# e.g. for example.com/kirbycms/
location /kirbycms/ {
if (!-e $request_filename) {
rewrite ^/kirbycms/(.*)$ /kirbycms/index.php last;
break;
}
}
# e.g. for example.com
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php last;
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment