Skip to content

Instantly share code, notes, and snippets.

@lorainwings
Created January 8, 2020 10:00
Show Gist options
  • Save lorainwings/b2f4a7b1a8bb2944666fab6ca3ad1ad5 to your computer and use it in GitHub Desktop.
Save lorainwings/b2f4a7b1a8bb2944666fab6ca3ad1ad5 to your computer and use it in GitHub Desktop.
location ~ /(.*)/detail {
set $first_path $1;
root /home/www/growth-upgrade/html;
try_files $uri $uri/ $first_path/index.html;
if (!-e $request_filename) {
rewrite ^/(.*) /$first_path/index.html last;
break;
}
}
location ~ /(.*)/(.*) {
set $first_path $1;
set $following_path $2;
root /home/www/growth-upgrade/html;
try_files $uri $uri/ $first_path/index.html;
if (!-e $request_filename) {
rewrite ^/(.*) /$first_path/index.html last;
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment