gatsby-plugin-client-side-redirect | gatsby plugin client side redirect | Plugin library
kandi X-RAY | gatsby-plugin-client-side-redirect Summary
kandi X-RAY | gatsby-plugin-client-side-redirect Summary
gatsby plugin client side redirect
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Write redirects to a folder .
gatsby-plugin-client-side-redirect Key Features
gatsby-plugin-client-side-redirect Examples and Code Snippets
Community Discussions
Trending Discussions on gatsby-plugin-client-side-redirect
QUESTION
I'm in a bit of an unfortunate position where the design choices of someone years ago are now affecting my rebuild of a website. Basically, way back when the site was originally created the designer pushed to have all URLs be fully explicit with the .html extensions (eg website.com/index.html). I am currently in the process of rebuilding the site with Gatsby and it has come to my attention that we need to continue resolving those old URLs as they are still scattered around the internet in the form of links. But the owner would like to move away from those URLs going forward, so basically I just need to support resolving them for backwards compat.
I have been working with the onCreatePage function and can get it to resolve the .html links like so:
...ANSWER
Answered 2020-May-26 at 18:12createRedirect
works, it just doesn't work while running the site in development mode. You need to do a full build and serve locally if you want to observe the redirects working correctly locally.
Final code was:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gatsby-plugin-client-side-redirect
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page