I am a newbie to Drupal and having hard time to understand how to redirect all URLs for all terms in a specific vocabulary to custom URLs.
I have tried to use Entity Path, but it did not work for me. By some reasons this module sets automatic alias field empty in a term edit form. This breaks Pretty Path module that I am also using.
I have also tried to implement custom hook as described here, but cannot understand how to make it work only for a specific vocabulary, the hook applies to all vocabularies on my site.
I would be greatly appreciate if someone can provide a step-by-step instruction to solve this issue.
edit after I tried to get it to work via Rues
Here is exported Rules
{ "rules_redirect_an_old_path_to_a_new_path" : {
"LABEL" : "Redirect Categories Terms to Custom Path",
"PLUGIN" : "reaction rule",
"ACTIVE" : false,
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "init" : [] },
"IF" : [
{ "text_matches" : { "text" : [ "site:current-page:url" ], "match" : "existing_vocabulary_alias/[term:name]" } }
],
"DO" : [ { "redirect" : { "url" : "custom_text\/custom_text\/[term:name]" } } ]
}
}