HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

canonical just on Pg1

edited April 2017 in General Banter

Hi all,
How can i put canonical tag just for the first page.
for exemple:
mysite.com/forum/post (canonical will be mysite.com/forum/post)

mysite.com/forum/post-pg2 (canonical should be mysite.com/forum/post not mysite.com/forum/post-pg2 )

or is there a way to remove pag2, pag3, pag4 ....

Thanks

Comments

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Doing so is quite simple, though I'm not sure why you would do so. You would need a plugin or a themehooksfile where you could insert this method:

        public function discussionController_render_before($sender, $args) {
            $sender->canonicalUrl($sender->Discussion->Url);
        }
    

    But as I understand the canonical meta tag, forcing it like that would be wrong.

Sign In or Register to comment.