Skip to content

Instantly share code, notes, and snippets.

@trajche
Forked from marijnvdwerf/gist:2399778
Last active August 29, 2015 13:57
Show Gist options
  • Save trajche/9448396 to your computer and use it in GitHub Desktop.
Save trajche/9448396 to your computer and use it in GitHub Desktop.
Kirby Nginx Rewrite SEO URL's
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php last;
break;
}
}
location /panel {
if (!-e $request_filename) {
rewrite ^/(.*)$ /panel/index.php last;
break;
}
try_files $uri $uri/ /index.html;
}
///////////////////////////////
//For subdirectory use this one:
////////////////////////////////
location /subdirectory/ {
if (!-e $request_filename) {
rewrite ^/(.*)$ /subdirectory/index.php last;
break;
}
}
location /subdirectory/panel {
if (!-e $request_filename) {
rewrite ^/(.*)$ /subdirectory/panel/index.php last;
break;
}
try_files $uri $uri/ /index.html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment