Skip to content
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

adds www.usability.gov and accessibility.digital.gov redirects #243

Merged
merged 1 commit into from
Mar 26, 2024
Merged
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
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ services:
- app:www.search.gov
- app:ads.18f.gov
- app:usability.gov
- app:www.usability.gov
- app:design.login.gov
- app:developer.login.gov
- app:partners.login.gov
- app:accessibility.digital.gov
- app:components.designsystem.digital.gov
- app:climate-data-user-study.18f.gov
- app:govconnect.18f.gov
Expand Down
25 changes: 22 additions & 3 deletions templates/_federalist-redirects.njk
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,32 @@ server {
return 301 https://$target_domain$request_uri;
}

# usability.gov to usability.gov
# accessibility.digital.gov to digital.gov/guides/accessibility-for-teams/
server {
listen {{ PORT }};
set $target_domain www.usability.gov;
set $target_domain digital.gov/guides/accessibility-for-teams/;
server_name accessibility.digital.gov;
add_header Strict-Transport-Security 'max-age=63072000; includeSubDomains; preload';
# Making this a temp 302 to verify their target domain
return 302 https://$target_domain;
}

# usability.gov to digital.gov/topics/usability
server {
listen {{ PORT }};
set $target_domain digital.gov/topics/usability/;
server_name usability.gov;
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
return 301 https://$target_domain$request_uri;
return 301 https://$target_domain;
}

# www.usability.gov to digital.gov/topics/usability/
server {
listen {{ PORT }};
set $target_domain digital.gov/topics/usability/;
server_name www.usability.gov;
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
return 301 https://$target_domain;
}

# summit.digitalgov.gov to digital.gov
Expand Down
2 changes: 2 additions & 0 deletions templates/manifest-prod.yml.njk
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ routes:
- route: www.18f.gov
- route: digitalgov.gov
- route: www.digitalgov.gov
- route: accessibility.digital.gov
- route: emerging.digital.gov
- route: summit.digitalgov.gov
- route: www.digital.gov
Expand Down Expand Up @@ -45,6 +46,7 @@ routes:
- route: ads.18f.gov
- route: paid-leave-prototype.18f.gov
- route: usability.gov
- route: www.usability.gov
- route: developer.login.gov
- route: partners.login.gov
- route: components.designsystem.digital.gov
Expand Down
4 changes: 3 additions & 1 deletion test/integration/test_federalist_redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ const expectedRedirects = [
{ from: 'handbook.18f.gov', to: 'handbook.tts.gsa.gov', redirectCode: 301 },
{ from: 'frontend.18f.gov', to: 'engineering.18f.gov/frontend', redirectCode: 301, noPath: true },
{ from: 'www.search.gov', to: 'search.gov', redirectCode: 301 },
{ from: 'usability.gov', to: 'www.usability.gov', redirectCode: 301 },
{ from: 'usability.gov', to: 'digital.gov/topics/usability', redirectCode: 301, noPath: true },
{ from: 'www.usability.gov', to: 'digital.gov/topics/usability', redirectCode: 301, noPath: true },
{ from: 'accessibility.digital.gov', to: 'digital.gov/guides/accessibility-for-teams', redirectCode: 302, noPath: true },
{ from: 'emerging.digital.gov', to: 'digital.gov/topics/emerging-tech', redirectCode: 301, noPath: true },
{ from: 'components.designsystem.digital.gov', to: 'designsystem.digital.gov/components', redirectCode: 301, noPath: true },
{ from: 'partners.login.gov', to: 'www.login.gov/partners', redirectCode: 301, noPath: true },
Expand Down
Loading