Skip to content

feat: add misc challenges redirects (for pokemon project) #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions maps/learn-to-learn--misc-challenges.map
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
~^/learn/relational-database/learn/javascript-algorithms-and-data-structures-v8/build-a-pokemon-search-app-project/build-a-pokemon-search-app/?$ /learn/javascript-algorithms-and-data-structures-v8/build-an-rpg-creature-search-app-project/build-an-rpg-creature-search-app;
1 change: 1 addition & 0 deletions sites-enabled/10-www.freecodecamp.org.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# legacy redirect maps
include snippets/common/legacy-maps.conf;
include snippets/common/project-euler-maps.conf;
include snippets/common/misc-challenges-maps.conf;

# caching news
proxy_cache_path /tmp/nginx-cache-prd-eng
Expand Down
1 change: 1 addition & 0 deletions sites-enabled/20-www.freecodecamp.dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# legacy redirect maps
include snippets/common/legacy-maps.conf;
include snippets/common/project-euler-maps.conf;
include snippets/common/misc-challenges-maps.conf;

# This is already declared in the www.freecodecamp.org config
# proxy_cache_key "$scheme$request_method$host$request_uri";
Expand Down
2 changes: 2 additions & 0 deletions snippets/app/learn.dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ location ^~ /unsubscribe/ {
}

include snippets/common/project-euler-redirects.conf;

include snippets/common/misc-challenges-redirects.conf;
2 changes: 2 additions & 0 deletions snippets/app/learn.org.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ location ^~ /unsubscribe/ {
}

include snippets/common/project-euler-redirects.conf;

include snippets/common/misc-challenges-redirects.conf;
4 changes: 4 additions & 0 deletions snippets/common/misc-challenges-maps.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

map $request_uri $misc_challenges_redirects_uri {
include /etc/nginx/maps/learn-to-learn--misc-challenges.map;
}
4 changes: 4 additions & 0 deletions snippets/common/misc-challenges-redirects.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

if ( $misc_challenges_redirects_uri ) {
return 301 $misc_challenges_redirects_uri;
}