I have installed Global redirect 1.x-dev. It redirects from node/* to alias, but not from one alias to another.

Comments

Daemon_Byte’s picture

I 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.

nicholasthompson’s picture

Status: Active » Closed (works as designed)

This 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.

donquixote’s picture

Let me disagree :)

This is outside of GR's scope as there is no way to set a "primary" alias.

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.