Home  >  Article  >  Backend Development  >  请大家帮帮我看这个正则表达式如何写?

请大家帮帮我看这个正则表达式如何写?

WBOY
WBOYOriginal
2016-06-23 14:10:41749browse

我在写一个rewrite规则,我的需求是:访问的URL地址中匹配所有不是以“admin.php”、“images”开头的其他地址,我自己试着写了个好像不对,请大家帮帮我。


回复讨论(解决方案)

我有个以前用的笨办法,写两条rewrite就可以了(注意顺序).
第一条匹配所有。
第二条再专门匹admin,images。

我想用一个正则来表达

 需要用到正则中的反向否定预查

^(?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn