Closed (works as designed)
Project:
Global Redirect
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2010 at 17:17 UTC
Updated:
26 May 2010 at 22:12 UTC
I have installed Global redirect 1.x-dev. It redirects from node/* to alias, but not from one alias to another.
Comments
Comment #1
Daemon_Byte commentedI had this problem also. It comes from the way drupal_lookup_path caches the results of a src lookup. I haven't come up with a nice solution yet but on line 130 on globalredirect.module you can change the line
$alias = drupal_get_path_alias($request);
to
drupal_lookup_path('wipe'); //added to make alias go to alias.
$alias = drupal_get_path_alias($request);
and it will do what you want. I'm not sure if there is a nicer way to do this to go back into the module itself.
Comment #2
nicholasthompsonThis is outside of GR's scope as there is no way to set a "primary" alias.
Your best option is to clean out your url_alias table so it only contains your primary alias for the node. Then use the awesome module Path Redirect to redirect your old aliased to the new ones.
Comment #3
donquixote commentedLet me disagree :)
It is true the definition of "primary alias" is neither well-documented nor well-designed, but there is always one alias that is chosen for a redirect, if you type node/123. Probably the one that is first in the db table.. We should take this as a spec, as long as we lack a better one.
I think it would be reasonable to provide an option for redirecting other aliases to this "primary" alias.