我按照在这里一些以前回答问题,并改写了我的phpBB论坛的主网址如下:如何从phpBB url中删除尾部斜杠?
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC]
RewriteRule^/%1 [R=301,L]
曾经是
http://site.com/forum/index.php
论坛网址现在它成功地解析为
http://site.com/forum/
我想删除最后的斜线。我应该对上面的代码做些什么改变?
P.S.我需要对同一网站的wiki页面进行类似的更改,该页面当前可解析为site.com/wiki/index.php?title=Main_Page(我需要它为site.com/wiki)
是没有做任何事情 –