-
Notifications
You must be signed in to change notification settings - Fork 93
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
Add "redirects" configuration #50
Comments
Note that this requires a new route parsing rule: colon-based segments. We can talk about this more, but basically need to be able to redirect segments dynamically and this is the best way I can think to do it. Open to comment. |
What do you mean by "segments"? |
URL segments. So e.g. |
That makes sense. I already have a module that will make those segments very easy. Recommendations:
{
"routes": {
"/some/path": {
"status": "302",
"path": "/some/other/path/redirectied"
}
}
} This makes less confusion as to where the status and the path go in the array for the user. |
We already handle redirects in the routing? I thought it was only rewrites. How do redirects currently work in routes? |
I lied. The only redirects that happen are for clean urls and directory indexes. We should add a |
Yeah, and you're right it should be plural since |
NOTE: providing a url redirects to that url. Providing a path, redirects only to that path |
Some support for redirects. Ref #50
Let's do |
We need to support redirection via the superstatic JSON config. Like so:
By default, redirects should use the
301
status. However, the user can specify a custom status like so:T
The text was updated successfully, but these errors were encountered: