I want to remove the last trailing slash of a URL. For example: I want to http://localhost/mysite/page/ rewrite to http://localhost/mysite/page.
I'm using this code on my localhost .htaccess.
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([a-zA-Z0-9_-]+)/$ $1 [R=301,L]
RewriteRule ^([a-zA-Z0-9_-]+)$ web.php?page=$1
If I write on my browser http://localhost/mysite/index, it shows what I want. But if I write http://localhost/mysite/index/ it tells me "not found" and "the requested URL was not found on this server". I'm using UniServer on Windows 8.
Options +FollowSymLinks RewriteEngine onWhen I write
http://localhost/mysite/indexIt shows me a problem with a redirect loop. And if I writehttp://localhost/mysite/index/, it redirects me to:http://localhost/C:/UniServer/www/mysite/index.If I only write the first rule, it works for "index" but it redirects to the same with "index/".
– Tes Mar 10 '13 at 07:54