Apache mod_rewrite中的奇怪行为

时间:2017-09-20 06:30:13

标签: apache .htaccess mod-rewrite

我有这个层次结构,

root/
 |--sections/
 |--test/
 |--.htaccess

在.htaccess文件中,我有这个规则用'a'替换所有't',

RewriteEngine On
RewriteBase "/"
RewriteRule "^(.*)t(.*)$" "$1a$2" [R,L]

如果我访问 localhost / sections ,结果是 localhost / secaions / (启用了mod_dir),但是当我访问 localhost / test ,该规则未应用,结果为 localhost / test /

我尝试了 tessst,tett,tttt 等。它只发生在测试上。测试是Apache的遗留关键字还是什么?

0 个答案:

没有答案