Taxonomy: How to redirect synonym pages to preferred term?

merlinmann - October 6, 2007 - 18:34

I've added a number of popular synonyms for the most used taxonomy terms on my site. For example "OS X" and "Leopard" are synonyms for my preferred "Mac OS X" term.

Is there a module or the like that can redirect taxonomy pages for synonyms to the page of the preferred term? E.G., I'd love for visits to "/topics/os-x" to do a 301 redirect to the preferred "/topics/mac-os-x" page.

My thinking is that if a user enters "OS X" as a term for a new node, it would still show up by "Posted In:" as "OS X" — but clicking the term's link would take the visitor to the "/topics/mac-os-x" page. Seems like this gives contributors the ability (within reason) to tag things with what makes sense to them, but it lets me (the site owner) retain a certain amount of control over the vocabulary that minimizes sprawl and ensures visitors can find what they want without leakage or unnecessary hunting.

Thanks in advance for any ideas or thoughts on this one.

synonyms

tm - October 6, 2007 - 20:49

was listening to the lullabot podcast on taxonomy (48), and the synonym module was mentioned. have not tried it yet, but intend to look.

Any other ideas for this?

RoKoMa - November 1, 2007 - 22:23

Any other ideas for this? Got the same problem....

interested in it,

no2e - November 30, 2008 - 18:22

interested in it, too

Another nice option would be,
to rank terms higher, when users are searching for a synonym.

So let's say:
I got the term "Mac OS X" with the synonym "Leopard".

If a user searches for "Leopard", all nodes tagged with "Mac OS X" shall be listed, too - although "Leopard" is not included as a keyword.

taxonomy_redirect

Jaafarix - December 24, 2008 - 12:28

You can use the taxonomy_redirect module it does the job:
- Tag a node with "leopard"
- Redirect the "leopard" term to /topics/mac-os-x
- Now when you hover on "leopard" link, you can see that it is linked to /topics/mac-os-x

but it is not perfect:
- /topics/leopard will still exist if you type it in the url, so you have to redirect it with pathauto/htaccess or block it from robots
- You actually have to edit each term to make work. It is time consuming
- It does not make use of the synonym textarea in term definition

It will be better if someone develops a module that:
- When a new term is entered -> check {term_synonym} table and get te main term ID
- Link the new term to the main term
- Redirect /topics/"new term" to /topics/"main term"

I also need this, so may be i'm going to develop it, but i'm still a drupal newbie and i don't have a lot of time for this right now

 
 

Drupal is a registered trademark of Dries Buytaert.