Reviewed & tested by the community
Project:
Match Redirect
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2013 at 05:39 UTC
Updated:
6 Aug 2020 at 13:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
biff45452 commentedNot at this time but I have plans to make it possible to do this:
Source:
retail-shops/*
Target:
grocery-shops/%1
Comment #2
UksusoFF commentedAny solution for this?
Comment #3
paul2 commentedYes, that's what I was expecting this module to do as well, I'm surprised it's not supported yet. Guess I'll find something else.
Comment #4
ar-jan commentedThis would be very useful. +1.
Comment #5
beauKC commentedAgreed. Kind of assumed that's what this module did. Not particularly useful without this feature, to be honest. +1
Comment #6
adam_b commentedYes, please. +1
Comment #7
alexanansi commentedI assumed that was what this module did too. At least describe the module better because there are obviously lots of other people getting confused about this +1
Comment #8
salvisSame here. As long as we're not able to pick up the tail of the path we can't do much more than redirecting to an error page.
Also #2502707: Match Redirect overrides Redirect, which makes this even worse, essentially making Match Redirect unusable.
Comment #9
RStrydom commentedI just came across the same module and expected the same functionality. I already changed my pathauto pattern and regenerated all the aliases, so I desperately needed this functionality. I quickly made a patch which worked for my specific sitiuation. Do not use this patch without understanding it's limitations. Basically it just takes the begining part of the pattern (before the '*') and concatinates it with the last part (after the '*') of the target URL.
for e.g.:
Setting:
Pattern - alias/*
Target - new-alias/subpath/*
Test:
Test URL - alias/node-title
Result URL - new-alias/subpath/node-title
As I said I needed it so this is a really ugly solution, but I hope it helps someone and can help move this forward to getting this as a full fledged feature.
Comment #10
luison commented#9 works great!! Dont know why is this option in the module... with that I was able to redirect taxonomy in users to a view of users with that taxonomy and without disabling the taxonomy view!!! ^_^
Comment #11
sirtet@RStrydom in comment #9:
I don't see what the limitations of the approach used could be.
Can someone elaborate?
Comment #12
RStrydom commented@sirtet
The limitation is that is pure concatination of the two strings. So you won't be able to replace a value that is sitting between two static path values. For eg. path/to/*/content/ etc.
On a side note I did this in a rush so knowing that one is generating a lot of aliases, I didn't want anyone to accidentally mess it up.
Comment #13
philosurfer commented# 9 worked great!
Comment #14
humansky commented#9 works like a charm
Comment #16
nwom commentedHere is a re-rolled patch against the newest dev, since patches always need to be applied to dev releases rather than stable versions. Thanks for your work on this. Please review.
Comment #17
nwom commentedComment #19
ejrasmus commentedHere is the same patch from #16 with a check to see if there is also a wildcard in the Target URL as suggested in #18.
Comment #20
dsim commentedHere is the patch which embeds the query parametes in the target url if target url does not have query params.
Comment #21
dsim commentedAttaching a patch which supports case insensitive urls.
Comment #22
khalor commentedThis only works if the wildcard is at the end of the URL... wouldn't work if the URL to redirect from was group/*/invite for example.
I'm using the following, but it only works for single-character wildcards - needs some logic to detect length of the replaced wildcard:
Comment #23
ndf commentedThis is a re-roll of #9 against current --dev version.
Comment #24
doteagle commentedTried patch and worked as intended.
Comment #25
Anonymous (not verified) commentedPatch 23 worked for me.
Comment #26
jfarry commentedNot sure on the requirements for RTBC but I've just tested this and it's working great for me too :)
Comment #27
ndf commentedChanges of #20 and #21 then should go to separate issues.
Comment #28
lwalley commentedSeparate patch for #21 case insensitive match is available at #2948710: Case insensitive matches #3.