Problem/Motivation
Follow up from #2833457: Allow redirect between domains.
The domain redirect module offers the users to redirect between domains.
Wildcard redirects are also allowed, so for example a user can redirect:
a) example.com/* ---> redirected.com/example
b) example.com/subpath ---> secondredirect.com/subpath
The problem here is that the redirect a) will catch all requests including example.com/subpath from b) redirect.
Proposed resolution
In order to fix this problem there are 2 solutions to prioritize the redirects:
1. Sort the redirects automatically on submit in that way that the wildcards come last for response
2. Make the redirect table draggable for the user to reorder the redirects manually.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | sort_the_domain_redirects-2852514-5.patch | 5.47 KB | basvredeling |
| #2 | sort_the_domain_redirects-2852514-2.patch | 5.46 KB | ginovski |
Comments
Comment #2
ginovski commentedAdded automatic sorting along with test and added help description.
Comment #3
wim leersComment #4
basvredelingPatch doesn't apply to latest dev any more (in a composer workflow).
Comment #5
basvredelingThis patch is mostly identical. Only checksum and translatable changed.
Comment #6
berdirYou need to upload the file as a .patch (not .patch.txt) so it can be tested.
Comment #7
basvredelingComment #8
basvredeling