.htaccess 使用查询字符串重写URL失败

.htaccess 使用查询字符串重写URL失败,.htaccess,mod-rewrite,.htaccess,Mod Rewrite,我在这里读了很多帖子,也在谷歌上搜索了几个小时,我一直在努力实现以下目标: <IfModule mod_rewrite.c> Options All RewriteEngine on RewriteRule ^content/tagged/(\w+)/?$ /content.html?tagged=$1 [L] </IfModule> 关闭MultiViews,因为源URL以/content开头,并且有一个匹配的content.html文件。

我在这里读了很多帖子,也在谷歌上搜索了几个小时,我一直在努力实现以下目标:

<IfModule mod_rewrite.c>
    Options All
    RewriteEngine   on
    RewriteRule ^content/tagged/(\w+)/?$ /content.html?tagged=$1 [L]
</IfModule>

关闭
MultiViews
,因为源URL以
/content
开头,并且有一个匹配的
content.html
文件。另外,请确保在启动目标URL时不使用
/
将请求转发到当前目录的
content.html
文件

Options All -MultiViews
RewriteEngine on

RewriteRule ^content/tagged/(\w+)/?$ content.html?tagged=$1 [NC,L,QSA]
使用的标志为:

NC  - Ignore case
QSA - Query String Append
L   - Last Rule
参考资料:

你有没有什么特别的插件,可以告诉你什么时候有贴有标签的帖子?你怎么这么快就到了这里?谢谢@anubhava。如您所示,我添加了
-MultiViews
,但它仍然不起作用。@PanamaJack:lol:)没有插件。另外,我也没有那么快,在Java和regex标记中看到了更快的响应。从字面上说,在文件的顶部添加了“垃圾”。前面的斜杠是我对自己感到疑惑/质疑的地方,就像这样回到了根。
Options All -MultiViews
RewriteEngine on

RewriteRule ^content/tagged/(\w+)/?$ content.html?tagged=$1 [NC,L,QSA]
NC  - Ignore case
QSA - Query String Append
L   - Last Rule