Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

Set up redirects for old regional URLs #1326

Closed
2 tasks done
shawnbot opened this issue Mar 17, 2016 · 5 comments
Closed
2 tasks done

Set up redirects for old regional URLs #1326

shawnbot opened this issue Mar 17, 2016 · 5 comments

Comments

@shawnbot
Copy link
Contributor

shawnbot commented Mar 17, 2016

When we implement regional pages (as sketched in #1267) we'll need to:

  • look at the analytics to see if anyone is actually linking to the regional explore data views, so that we can decide whether to...
  • set up redirects for the old URLs that send visitors to the new ones

One way to do this could be to put together some redirect logic for different URLs in the form of URI templates that could live in the front matter of each page, as in:

redirects:
  region: {region}/{?year}
  region,commodity: {region}/{?year}#{commodity}
  region,commodity,product: {region}/{?year}#{commodity}/{product}

So the JavaScript for that page would check (from the longest to the shortest) whether the hash contained all of those parameters, and for the first one it finds, redirect to the corresponding URL.

@coreycaitlin
Copy link
Contributor

Brief analytics report over in #1458 — briefly, there isn't a ton of traffic, and I don't think we should worry about it too much, as long as people land on explore data pages.

@meiqimichelle meiqimichelle removed this from the Sprint-QwertyQuoll milestone Jun 22, 2016
@meiqimichelle
Copy link
Contributor

@shawnbot Is this still relevant, or are there individual tasks that need to be managed (ie, explicit redirects from the old urls to the explore data homepage)?

@shawnbot
Copy link
Contributor Author

I think @coreycaitlin's analysis is spot on. Having redirects in place would be good to handle cases in which we link to deprecated URLs, though, unless we're planning on fixing those links before release. I have some experience doing this with the front end guide (funnily enough, in the opposite direction: from multiple pages to anchors on a single page), and it should be pretty simple.

@coreycaitlin
Copy link
Contributor

@meiqimichelle Is there anything else for me to tackle on this? I'm happy to do it, but not sure about next steps.

@shawnbot
Copy link
Contributor Author

Redirects are working! Let's close this one.

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

No branches or pull requests

3 participants