-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
What is the good method to configure redirection from /
page to another page ?
#18665
Comments
/
page?/
page?
/
page?/
page?
/
page?/
page?
You can simply redirect like this
OR
|
@Pratikkakkad I would like a redirection from Why can't I use this below?
Why treat |
@KyleAMathews an idea? what is your vision / guideline about this? It is a bug or a feature? |
/
page?/
page to another page ?
The message Redirects seem to generate This might be another issue, but do redirects belong in |
Stopping This is also a bug... deleting a page file should not require restarting |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
I have the same issue. I would expect to pass some option to
|
👋 @harobed, @n-mirzayev. I've been looking at this a little bit this morning and am not sure I'm seeing what's missing here. From my testing, doing a redirect from What is the expected behavior here? |
@blainekasten In my case I really don't have index page as I am developing multi-language application I need to redirect to pages that builds in gatsby-node. For example if user opens example.com app I need the page redirected to example.com/en/about. Regarding warning, When I am opening localhost:8000 I see in browser console such message: |
@n-mirzayev So to make sure I understand, as it is today, this works. But the console message is a bit misleading and incorrect? Is that the problem? Or does something not work. |
@blainekasten Functionality works, it redirects as expected. But we get a warning message in console. It can be a question if there is a way to have redirect without getting warning message, otherwise it can be considered as bug and we shouldn't get warning message. |
Just checking if the other page is not 404 before showing the error would fix it. Very easy PR |
Great! Thanks for the clarification everyone! @Sever1an (or @n-mirzayev or anyone else 😄) would you be interested in contributing a fix for this? We love empowering the community to be part of the Gatsby contributor base! Any way I can help get you involved let me know. |
@blainekasten I would love to contribute. |
@n-mirzayev great! This article explains how to setup gatsby locally to make changes. It sounds like the expected behavior is to just not do the log if there isn't an index file, or index route. This log is executed in |
@blainekasten @Sever1an Created PR for this issue: #19789 . As this is my first try all comments are welcome :) |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
This got working for me. Thanks @n-mirzayev |
How can I redirect
/
to/page-2/
?I have tryed 2 solutions:
First solution
https://github.com/harobed/gatsby-redirect-on-root-index in
master
branch.When I execute
npm run develop
, I have this error in Browser console:but no error after
npm build; npm serve
Second solution
https://github.com/harobed/gatsby-redirect-on-root-index in
page-resources-is-undefined
branch.When I execute
npm run develop
, I have this error in Browser console:When I execute
npm build; npm serve
, I have this error:this is not found page, redirection don't work.
Question
What is the good method to configure redirection on
/
page?The text was updated successfully, but these errors were encountered: