RewriteRule 中的正则表达式在 MAMP 中中断
我刚刚从 XAMPP 切换到 MAMP,现在这个重写规则不再起作用
RewriteRule ^([0-9]{6}+)/?$ includes/redirect.php?ref=$1 [L]
在 Appache 错误日志中:
[Mon Nov 22 13:59:24 2010] [alert] [client 172.xx.xx.x] /Applications/MAMP/htdocs/myapp/.htaccess: RewriteRule: cannot compile regular expression '^([0-9]{6}+)/?$'
有什么想法吗?我的其他规则(来自redirect.php)工作正常:
RewriteRule ^([0-9]{6})-.*?\.html$ templates/default/index.php?ref=$1 [L]
I just switched from XAMPP to MAMP and now this rewrite rule does not work anymore
RewriteRule ^([0-9]{6}+)/?$ includes/redirect.php?ref=$1 [L]
In the Appache error log:
[Mon Nov 22 13:59:24 2010] [alert] [client 172.xx.xx.x] /Applications/MAMP/htdocs/myapp/.htaccess: RewriteRule: cannot compile regular expression '^([0-9]{6}+)/?
Any idea's? My other rule (from redirect.php) works fine:
RewriteRule ^([0-9]{6})-.*?\.html$ templates/default/index.php?ref=$1 [L]
Any idea's? My other rule (from redirect.php) works fine:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个奇怪的片段,我怀疑这就是问题所在。您说的是 6 位数字,然后又说一位或多位数字?
您想要匹配什么?
This is an odd fragment that I suspect is the issue. You're saying exactly 6 digits, then saying one-or-more as well?
What did you want to be matched?