I have the following .htaccessfile
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
And I have the following url:
http://localhost/mysite/loginPage/
I want to ensure that this url will never ends with forward slash (loginPage/).
I tried to use the following lines:
RewriteRule ^(.*)\/(\?.*)?$ $1$2 [R=301,L]
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteRule ^([^/]+/[0-9]+/[0-9]+/[0-9]+/[^/]+)/.+$ - [L,R=404]
But I get error message in all cases that page is not redirecting properly. Please have in mind that I want this just for the specific URL above, i don't care for the rest of the site.