-
Notifications
You must be signed in to change notification settings - Fork 6
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 redirect for agendas2002 subdirectory #148
Conversation
redirects-www.conf
Outdated
@@ -250,6 +250,7 @@ rewrite ^/rad/(.*) https://transition.fec.gov/rad/$1 redirect; | |||
rewrite ^/pubrec/(.*) https://transition.fec.gov/pubrec/$1 redirect; | |||
rewrite ^/agenda/([0-9]+)/documents/(.*) /resources/updates/agendas/$1/$2 redirect; | |||
rewrite ^/agenda/([0-9]+)/(.*).pdf /resources/updates/agendas/$1/$2.pdf redirect; | |||
rewrite ^/agenda/agendas2002/(.*).pdf https://www.fec.gov/resources/updates/agendas/$1 redirect; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dorothyyeager The redirect path is really close and thanks for figuring this out! We'll want to do a few additional things.
- Update the redirect path to include the year's directory path and the extension. So it should look like this:
rewrite ^/agenda/agendas2002/(.*).pdf https://www.fec.gov/resources/updates/agendas/2002/$1.pdf redirect;
I also checked to make sure the bucket contains those files, and they do.
- This will also be a problem for agendas from 2000, 2001, and 2003. So we'll need to handle those redirects too. Can you please add the following redirects?
rewrite ^/agenda/agendas2000/(.*).pdf https://www.fec.gov/resources/updates/agendas/2000/$1.pdf redirect;
rewrite ^/agenda/agendas2001/(.*).pdf https://www.fec.gov/resources/updates/agendas/2001/$1.pdf redirect;
rewrite ^/agenda/agendas2003/(.*).pdf https://www.fec.gov/resources/updates/agendas/2003/$1.pdf redirect;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Thank you so much @patphongs !!
Corrects redirect for agenda/agendas2002/ and adds similar redirect for 2003, 2001 and 2000.
redirects-www.conf
Outdated
rewrite ^/agenda/agendas2003/(.*).pdf https://www.fec.gov/resources/updates/agendas/2003/$1 redirect; | ||
rewrite ^/agenda/agendas2002/(.*).pdf https://www.fec.gov/resources/updates/agendas/2002/$1 redirect; | ||
rewrite ^/agenda/agendas2001/(.*).pdf https://www.fec.gov/resources/updates/agendas/2001/$1 redirect; | ||
rewrite ^/agenda/agendas2000/(.*).pdf https://www.fec.gov/resources/updates/agendas/2000/$1 redirect; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there, just need to add the .pdf
extension on the end of the resulting redirect. This will need to be done to all the resulting URLs. So like this https://www.fec.gov/resources/updates/agendas/2003/$1.pdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh! And you told me this before. Thanks for being so patient with me! It's added to all of them.
Adding .pdf to end of redirect string for agendas/agendasXXXX/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @dorothyyeager! I've deploy to stage for testing and it works well
The 2002 meeting minutes were in a subdirectory with a different name path than other years, so the www redirects are 404'ing.
Old path: /agenda/agendas2002/*.pdf
I've put in a broader redirect for that subdirectory both here and in proxy
If this works, it resolves # 3266