Skip to content

Commit

Permalink
feat: adjust nginx.page.conf to include sub path
Browse files Browse the repository at this point in the history
  • Loading branch information
tkubica-edu committed Nov 19, 2024
1 parent 069c724 commit 440050a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nginx.page.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ server {

# Serve supported languages from the respective directories.
location /search/en-US/ {
alias /usr/share/nginx/html/en-US/;
try_files $uri /en-US/index.html;
alias /usr/share/nginx/html/search/en-US/;
try_files $uri /search/en-US/index.html;
}
location /search/de/ {
alias /usr/share/nginx/html/de/;
try_files $uri /de/index.html;
alias /usr/share/nginx/html/search/de/;
try_files $uri /search/de/index.html;
}

# Take the first of the user's accepted languages.
Expand All @@ -26,7 +26,7 @@ server {

# Redirect requests to `/` to the user's preferred language as determined above.
location /search/ {
rewrite ^/$ search/$selected_language/ permanent;
rewrite ^/search/$ $selected_language/ permanent;
}

# redirect server error pages to the static page /50x.html
Expand Down

0 comments on commit 440050a

Please sign in to comment.