vti / bootylicious

LIghtweight blog engine on Mojo steroids!
84 stars 13 forks source link

301 redirect to a canonical URI #11

Closed memowe closed 14 years ago

memowe commented 14 years ago

.../articles/2009/12/foo.html and .../articles/2009/12/foo are pointing to the same site. It's meant to be a feature but IMHO that's bad for the pagerank and it breakes my Disqus comments because they are associated to the article's URI which isn't unique.

It would be great to have the article accessible under all URIs but get a 301 redirect to "the" canonical URI, whatever it will be.

What do you mean?

Mirko

vti commented 14 years ago

That is a good idea. Anyway through all the templates ".html" suffix is appended. So I guess, that is going to be the default url.

memowe commented 14 years ago

I think it would be cool to have a $c->canonical_url_for, too. ".html" suffix is perfect for HTML content! :)

vti commented 14 years ago

I've just added auto redirection in git. If no format is found client is redirected to html version.

vti commented 14 years ago

I should have tested more carefully. Try the new version, please.

memowe commented 14 years ago

Yeah, both issues are gone now, it "just works". Thank you very much!

vti commented 14 years ago

Thanks for the cool feature and with Mojolicious it was quite easy and elegant to implement :)