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
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

How to automatically redirect all URLs to Pretty URLs?

This discussion is related to the Vanilla addon.

Hi,

Now that Pretty URLs are kind of mandatory starting from version 2.3, I have enabled them in my forum.

The thing is that I thought all URLs would automatically be redirected to the new, pretty URLs, but that's not the case. And now I've got two URLs for every page. For example:

http://domain.com/discussion/28766/title-goes-here

http://domain.com/index.php?p=/discussion/28766/title-goes-here

(the two URLs lead to the same page)

I'm not an SEO expert, but I guess Google won't like that at all and might see that as duplicated content, which might lead to penalization, etc.

Is there a way to automatically redirect all URLs to Pretty URLs?

Thank you.

Comments

  • LincLinc Director of Development Detroit Vanilla Staff

    Vanilla utilizes canonical URL meta tags to tell search engines which URL is the correct one, which means it's not marked as duplicated content. A 301 redirect shouldn't be necessary. If you wanted, you could probably implement one purely in your htaccess file.

  • @Linc said:
    Vanilla utilizes canonical URL meta tags to tell search engines which URL is the correct one, which means it's not marked as duplicated content.

    Thanks for your reply, @Linc. I appreciate it.

    I never noticed the canonical thing. Has it been there all the time? I mean, since I was using version 2.2.1 and non-pretty URLs, I wonder whether the canonical URL feature was working already and showing the URLs without the index.php?p= part.

  • K17K17 Unlosk · Français / French ✭✭✭

    @AristaP PrettyURLs are available since Vanilla 2.0 (or 1.* but not sure) so I think canonical URL was already here.

    AristaP
Sign In or Register to comment.