I have the following htaccess
Options -Indexes +FollowSymLinks
RewriteEngine on
RewriteBase /
ErrorDocument 404 /404.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{THE_REQUEST} \s(.+?)/+[?\s]
RewriteRule ^(.+?)/$ /$1 [R=301,L]
That is removing slashes and the end of my urls. How can remove not only the slashes but all characters after the slash ? Or send a 404 maybe ?? Which one is better ? and how can it be done ?
For example www.mysite/index.php/index.php or anything else.
If you just try to remove all characters after slash:
For 404 error change last line to: