RedirectMatch 403--需要为.htaccess中的1个URL设置异常
如何允许“rpc.php”不被apache.htaccess中的这一行重定向RedirectMatch 403--需要为.htaccess中的1个URL设置异常,.htaccess,regex,.htaccess,Regex,如何允许“rpc.php”不被apache.htaccess中的这一行重定向 RedirectMatch 403 /+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+.*\.(php|tpl) 我有几个选择,但不确定最好的方法 负前瞻正则表达式是否有效?我尝试了几个变种,但没有成功 也许有一种方法可以在重定向匹配之前或之后放置显式允许 背景 对于那些想知道为什么的人。我正在为sugarcrm开发
RedirectMatch 403 /+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+.*\.(php|tpl)
我有几个选择,但不确定最好的方法
- 负前瞻正则表达式是否有效?我尝试了几个变种,但没有成功
- 也许有一种方法可以在重定向匹配之前或之后放置显式允许
RedirectMatch 403 /+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+((?!rpc).)*\.(php|tpl)
这应该与像
/soap/something.php
这样的东西匹配,但与/soap/rpc.php
完全不匹配。我完全搞砸了我的正则表达式。((?!rpc)。)*是天才。再次感谢。