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

App configuration - add URL redirects #56

Open
smalers opened this issue Jul 28, 2022 · 0 comments
Open

App configuration - add URL redirects #56

smalers opened this issue Jul 28, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request high Priority: next release if possible S Size: day or less

Comments

@smalers
Copy link
Contributor

smalers commented Jul 28, 2022

The InfoMapper is being moved from hash location to path location strategy, which will solve a number of issues including allowing search engine optimization and Google Analytics to a specific resource.

An initial solution is being implemented to automatically map the hash URLs to path URLs, which will help with the initial migration. As I understand it, this replaces /# with empty string.

Additionally, there may be cases in the future where map identifier or other resources will change, resulting in URL changes. It would be great if such changes could be handled in the application routing rather than having to do a CloudFront lambda, website redirect, or other technique. This will allow the InfoMapper implementer to add a redirect whenever a resource id changes. The following is an example of possible JSON for the application configuration file. Note that the URL fragments are relative to the base-href since this needs to work with any leading subfolders for the deployment, such as latest or a version. As usual, we can talk about the specific names that are used. Maybe "route" should be used instead of "path"?

"redirects" :  [
   {
      "oldPath": "/map/something",
      "newPath": "/map/something-new"
   }
]

It would be even more flexible if wildcards were allowed to allow evolution of the routing design, but this is not required at the moment, for example:

"redirects" :  [
   {
      "oldPath": "/map/*",
      "newPath": "/newmap/*"
   }
]
@smalers smalers added enhancement New feature or request high Priority: next release if possible S Size: day or less labels Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high Priority: next release if possible S Size: day or less
Projects
None yet
Development

No branches or pull requests

2 participants