HTML 5 Boilerplate HTACCESS 停止我的 mod_rewrite 工作
我正在使用未经编辑的 HTML5 BP 的 .htaccess 文件。一切工作正常,直到我添加自己的重写规则:
Options +FollowSymlinks
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([a-z]+-?[a-z]+)/$ /$1.php
如果将其添加到它自己的 .htaccess 文件(启动引擎并添加选项后),则效果很好,但添加到 html5 BP 的文件时则不然。我尝试将其放在整个文档中、if 标记内、文档顶部和底部。
重写应该使用 /example.php 加载 /example ,当与 h5bp 一起使用时,我收到 404 错误。
I'm using HTML5 BP's .htaccess file unedited. Everything works fine until I add my own rewrite rule:
Options +FollowSymlinks
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([a-z]+-?[a-z]+)/$ /$1.php
this works fine if add it to it's own .htaccess
file (after starting the engine and adding options) but does not when added to the html5 BP's file . I've tried placing it all over the document, inside the if tags, top of the doc and bottom.
The rewrite should load /example with /example.php , when using with h5bp I receive a 404 error .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从 h5bp 中删除行
Options -MultiViews
Removing the line
Options -MultiViews
from the h5bp