2

Is it of any advantage, in addition to using Global Redirect, to rewrite html links from /node/nid to /article/this-is-the-title, even though in both cases traffic is directed to /article/this-is-the-title (by Global Redirect).

Edit:

From this answer I gather that I should use Global Redirect so that aliases wouldn't cause "duplicate" content.

The same answer suggests a way to intercept links, passing them through functions to "convert from node/nid to article/title". However, I am green at coding Drupal, and have no clue as to go about it. Could some one advise on alternatives? Or ways of making this less cumbersome?

I am also adding this link to a related answer on avoiding disadvantages of 'same content/multiple URLs' for whoever's reference.

8
  • 2
    Pathauto does not do redirecting. It is just meant to automatically generate URL/path aliases for various kinds of content. – AjitS Jan 31 '13 at 11:56
  • So if you use Pathauto, the links will not change? If so, how do you use generated aliases? – Dominykas Mostauskis Jan 31 '13 at 12:00
  • No. They'll just have an alias. For e.g. if you have a page and its path is <yoursite_url>/node/1, pathauto will create an alias using the title of the content type. If the page title is foo bar then the alias will most probably be <yoursite_url>/content/foo-bar. Note that the page will also be accessible via <yoursite_url>/node/1. Nodes will have alias but the redirection to that alias is not handled by Pathauto. – AjitS Jan 31 '13 at 12:04
  • How do you change the links into SEO friendly links? As I understand that is key for SEO, correct me if I am wrong. – Dominykas Mostauskis Jan 31 '13 at 12:18
  • The edit you made is actually the solution for your queries. Global Redirect and Pathauto is a winning combination. Also, for SEO see the SEO Checklist module – AjitS Jan 31 '13 at 13:28
1

From this answer I gather that I should use Global Redirect so that aliases wouldn't cause "duplicate" content.

The same answer suggests using the l() function to have Drupal use "pretty paths" automatically.

I am also adding this link to a related answer on avoiding disadvantages of 'same content/multiple URLs' for whoever's reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.