danpros.com
Posted on
Drupal

Comment Fragment: Rewrite and Redirect Comment Permalink

Author

A few days ago I releasing new module to rewrite and redirect the comment permalink to use a fragment for SEO purposes. The default Drupal 7 comment permalink has the following format, www.example.com/comment/1#comment-1, if a node has 10 comments, each page with the URL /comment/[comment-id] loads identical content to the node itself.

10 comments is fine but how about 1000 comments? 1000 duplicate contents is very bad for SEO and our website may be the target of Google's sandbox. To resolve this issues than I rewrite the comment URLs to www.example.com/node/[nid]#[comment-id] or www.example.com/[pathalias]#[comment-id] than redirect the old URL format to new format.

This module name is Comment Fragment, visit module project page here.