May 29, 2020 in Tips and Tricks
How to prevent opening url ending with / using htaccess
Right below the RewriteEngine On line, add: to enforce a no-trailing-slash policy. To enforce a trailing-slash policy: EDIT: commented the R=301 parts because, as explained in a comment: Be careful with that R=301! Having it there makes many browsers cache the .htaccess-file indefinitely: It somehow becomes irreversible if you can’t clear the browser-cache on all machines that opened it. When testing, […]







