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 redirect for agendas2002 subdirectory #148

Merged
merged 3 commits into from
Oct 11, 2019

Conversation

dorothyyeager
Copy link
Contributor

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

@@ -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;
Copy link
Member

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.

  1. 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.

  1. 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;

Copy link
Contributor Author

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.
Comment on lines 253 to 256
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;
Copy link
Member

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

Copy link
Contributor Author

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/
Copy link
Member

@patphongs patphongs left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants