.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
参考资料:
-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