【发布时间】:2017-02-02 17:05:09
【问题描述】:
我的 htaccess 文件中有以下内容:
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{DOCUMENT_ROOT}/cached/%{REQUEST_URI}\.html -f
RewriteRule .* cached/%{REQUEST_URI}\.html [L]
我有一个网址 blah.com/a/
我有一个缓存的文件/a.html
如何告诉我的 htaccess 忽略尾部斜杠,以便查找并显示 a.html 而不是 a/.html
注意:从 URL 中删除斜线不是一个选项,因为 URL 模式已经设置。
【问题讨论】:
标签: apache .htaccess mod-rewrite