重写规则的问题
谁能向我解释为什么这个重写规则不起作用:
RewriteRule ^architecture/([a-zA-Z_]+)/(.*).html$ web/index.php?field=1&sub=$1&name=$2
在此网址上: http://localhost/greenlinked1-6.com/architecture/projects/84-test-deeplink-test.html
我应该做什么才能让它工作。 我试图在几篇文章中找到答案,但我无法弄清楚。
Can anyone explain to me why this rewrite rule doens't work:
RewriteRule ^architecture/([a-zA-Z_]+)/(.*).html$ web/index.php?field=1&sub=$1&name=$2
on this url: http://localhost/greenlinked1-6.com/architecture/projects/84-test-deeplink-test.html
And what I should do to get it working.
I've tried to find the answer in several articles but I can't figure it out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的
.htaccess
文件应放置在greenlinked1-6.com
目录中。确保没有冲突的规则,如下所示:Your
.htaccess
file should be placed in the directorygreenlinked1-6.com
. Make sure there are no conflicting rules, like this:检查您是否没有使用
RewriteBase /
只需删除 &再试一次...check that u havn't used
RewriteBase /
just remove & try again...