Skip to content

Commit

Permalink
Simplify path lookup rules
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Oct 25, 2023
1 parent 33f44c9 commit 0f8faef
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/skiff/templates/config/server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ server {
error_page 404 /_errors/404.html;

# Folders starting with _ are not publicly accessible
location ~ ^/_.*$ {
location ~ ^/_$ {
internal;
}

# Make /up look for /site/public/up.html
location ~ ^/([^\.]+)$ {
try_files /$1.html =404;
}

# Make /pricing/ look for /site/public/pricing/index.html
# Make /up look first for /up.html then /up/index.html
location / {
index index.html;
try_files $uri $uri.html $uri/index.html =404;
}
}

0 comments on commit 0f8faef

Please sign in to comment.