我想在不存在文件的情况下重写 URI - 这应该是我的观点 - 像这样:
http://example.com/test/path/example
→http://example.com/test
我已经用这条规则删除了斜杠:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} (.*)$
RewriteRule ^(.+)/$ $1 [R=301,L]
我必须在.htaccess
文件中添加什么才能获得所需的功能?