Answer the question
In order to leave comments, you need to log in
How to remove duplicate slashes in Laravel 4.2 url and put a closing slash on categories?
During the development of the project on Laravel 4.2, I discovered that a URL like example.com//////news is available , that is, you can substitute an infinite number of slashes and get page duplicates. How to fix?
And how to make it so that at the end of the URL for a category (if it does not have a .html extension) a closing slash is delivered, indicating that articles are contained there?
Thank you.
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule . %1/%2 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question