Closed (fixed)
Project:
Redirect
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Mar 2014 at 14:46 UTC
Updated:
25 Nov 2018 at 23:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
heddnHere's a super simple alter patch. What this lets me do is insert my own custom $_SERVER['HTTP_HOST'] logic. I extend the redirect schema to add a hostname column, altered the edit form to allow a hostname field and now I have a working solution to handle redirect on hostname, in addition to simply the URL path.
Comment #2
heddnComment #3
heddnTo be completely clear, the logic in #1 is all added in a custom module.
Comment #4
pere orgaAnd what about having a more specific name (for example
redirect_load)?I imagine more tags could be added in the future.
Comment #5
pere orgaOk, after reading https://www.drupal.org/node/310077 I see that having a 'redirect' tag woud be acceptable, as what is saying is that the query was created by Redirect module. More tags could always be added.
Patch applies and works, thanks
Edit: Still, I think adding another tag may be useful
Comment #6
dave reidWe already use the 'redirect_access' tag, could it not be re-used here?
Comment #7
berdir@Dave Reid: Using the access tag would also hide redirects from different domains on the overview, I don't think that is desired.
Based on that, a more specific tag like redirect_load_by_source or so might be a good idea, especially as others like redirect_list and redirect_access already exist.
Comment #9
dave reidNeeds work to use a more specific tag name.
Comment #11
heddnI'm picking this up again for some client work related to https://www.drupal.org/sandbox/lucashedding/2242839. More specific tag added.
Comment #12
ankurj commentedThat patch from @heddn in #11 looks good.
Comment #13
pifagor commentedRTBC
Comment #14
alex_optimLooks good too.
Comment #15
pifagor commentedComment #18
pifagor commented