-
Notifications
You must be signed in to change notification settings - Fork 8
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
:all and :any not working properly. #17
Comments
The DSL was influenced by a routing library I'd seen when I originally wrote the package. The purpose was simple: an easy to understand syntax for those who don't know regex well enough. As most redirects these days are slug-based (source and destination), I'd now recommend FastRoute as a handler - it provides the combination of simplicity and specificity. |
@mikerockett I see... My plan was to simplify it (implementation wise) to use regexes and then provide a "cookbook" of common regexes/redirects in a doc/wiki/readme to help people not used to regex. If you want to keep the syntax simple and readable perhaps we can simply prepend/append routes to the normal symfony/silex routing and provide a common controller endpoint to actually handle the actual redirect. The current approach feels a bit NIH to me (no offense intended). FastRoute looks great, but since bolt already ships with a routing lib it's probably easiest to just use that, no? |
Of course, no offense taken. Tbh, it was designed this way (implementation) as I had no clue how to work with the various routing packages available, even the Symfony one, but have come a long way since then. Additionally, thought it would have been a nice idea to build it from scratch and keep the package small. Only recommending FastRoute because of the syntax. Also, it's so ridiculously fast that it shouldn't really mean anything to include it. I'm using it in Jumplinks 2 for ProcessWire, and there are already some significant speed gains when there are a lot of redirects. End of the day: I handed this over to you, so please feel free to do as you deem fit - you probably know what Bolt users want more than I do. |
As said in #18, this extension is mainly for developers, so with a well enough documentation, regex gives you the most flexibility. Maybe an additional default wildcard (*) would be cool tough. |
This is a known bug. After consulting the author, we found out that
/unternehmen/{slug:segments}
works as a workaround.On slack, @SahAssar wrote: "I'm planning to rewrite it to use common regexes instead, I never understood why it tries to define it's own DSL just for redirects"
The text was updated successfully, but these errors were encountered: