Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
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.
0
Comments
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.
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.
@AristaP PrettyURLs are available since Vanilla 2.0 (or 1.* but not sure) so I think canonical URL was already here.