Mod_rewrite 人物之谜
我正在慢慢学习 mod_rewrite (关键字是 Slowly),并且正在使用教程的代码行,但我对该行中的一个符号的含义感到困惑。
RewriteCond %{REQUEST_URI} ^home|^about
^ 字符是什么意思?
I'm slowly learning mod_rewrite (keyword is slowly) and am using a tutorial's line of code but I'm stumped as to what one of the symbols in the line mean.
RewriteCond %{REQUEST_URI} ^home|^about
What do the ^ characters mean?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Apache 正则表达式(或简称 regexp)被称为 Perl 兼容正则表达式 (PCRE) 引擎。如果您在网上搜索 PCRE 教程,您会发现数百个命中。
^ 字符将字符串锚定到表达式的开头,因此这意味着以 home 或 about 开头。
The Apache Regular Expression (or regexp for short) is known as a Perl Compatible Regular Expression (PCRE) engine. If you search the web for PCRE tutorial, you will find hundreds of hits
The ^ character anchors the string to the start of the expression so this means beginning with home or about.