Skip to content

Commit

Permalink
Use more thorough rule
Browse files Browse the repository at this point in the history
  • Loading branch information
iHiD committed Jan 8, 2025
1 parent 601a3b4 commit 7b1e733
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,15 @@ http {
server_name www.exercism.org .exercism.io .exercism.net .exercism.com .exercism.lol;
return 301 https://exercism.org$request_uri;
}

server {
server_name bootcamp.exercism.org
return 301 https://exercism.org$request_uri;
server_name bootcamp.exercism.org;

location / {
# Rewrite rule to remove the /bootcamp prefix if it exists
rewrite ^/bootcamp(/.*)?$ $1 break;

# Redirect to the desired URL with the remaining path
return 301 https://exercism.org/bootcamp$request_uri;
}
}
}

0 comments on commit 7b1e733

Please sign in to comment.