Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Update for critical security issue in PHPMailer included in release Vanilla 2.3.1

canonical just on Pg1

edited April 19 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

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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.