Slash at the end of the url


#1

Hello folks!

I’m having some issues with the SEO of my website.
URLs are visible with and without a slash at the end. For example:

www.mywebsite.news
www.mywebsite.news/

Is there any way to choose in kirby which url paths i prefer? I’ve found this plugin but it seems not be available anymore
Redirect to Slash plugin - https://github.com/jenstornell/kirby-redirect-to-slash

I know i can use .htaccess but my .htaccess has a lot of redirects from the old site and i would prefer to fix this in a different way if it’s possible.

Thank you!!


#2

You should use your .htaccess imho. It’s a 2-line change and it should be compatible with redirects that are already added in your .htaccess

See: https://stackoverflow.com/questions/21417263/htaccess-add-remove-trailing-slash-from-url


#3

I agree with @bvdputte. That is exactly the reason why the plugin mentioned above was removed.


#4

Ok, if that is the better strategy i’ll include the redirection in the htaccess then. Thank you @bvdputte and @texnixe for your help!