-
-
Save trajche/9448396 to your computer and use it in GitHub Desktop.
Kirby Nginx Rewrite SEO URL's
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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