-
Notifications
You must be signed in to change notification settings - Fork 44
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
Supporting wildcards with * #203
Comments
I'm not entirely sure this is such a good idea from a technical point - e.g. due to the potential impact in may have on performance, and the extra complexity it will add to the package. So instead of creating the PR right away, perhaps let's continue the discussion here first. For instance, I'd like to see the SQL for looking up wildcard redirects. I don't think it will be a as simple as replacing a |
Been thinking about this more as well and your right. I think we could solve this by having a "include descendants" options in the UI which maps to a bool in SQL. We could then split the path into segments and query for the full path or the split paths that Include descendants. order by url length so you get the deepest match ------------------ A very rough SQL example (this schema was taken for a v8 project for speed) ------------------ begin tran declare @SkybrudRedirects TABLE ( insert into @SkybrudRedirects values (NEWID(), 0,NEWID(), '/example','','content',1000,NEWID(),'/', GETDATE(),GETDATE(),1,1,'','',1) insert into @SkybrudRedirects values (NEWID(), 0,NEWID(), '/example/unquie/result','','content',1000,NEWID(),'/', GETDATE(),GETDATE(),1,1,'','',0) -- Requested path /example/global select * from @SkybrudRedirects where [url] = '/example/global' or ([url] = '/example' and IncludeDescedents = 1) -- Requested path /example/unquie/result select * from @SkybrudRedirects where [url] = '/example/unquie/result' rollback tran |
Which version of Skybrud Redirects are you using? (Please write the exact version, example: 4.0.8)
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
10+
Question
Being able to do /* for all children is something we have found useful when doing redirects in code before. Looking at the redirect service, I think swapping it out for a % in the SQL query would be enough, and maybe a UI checkbox for it?
Let me know what you think happy to look at doing a PR for the feature
Thanks
Matt
The text was updated successfully, but these errors were encountered: