Home > Backend Development > PHP Tutorial > How to prevent RewriteRule from overwriting a secondary directory

How to prevent RewriteRule from overwriting a secondary directory

WBOY
Release: 2016-08-25 10:37:32
Original
1124 people have browsed it

目前规则,我想让他排除掉 cb 这个二级目录,就cb目录的话就不要执行这个重写路由,该怎么写啊。。:

<code> RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(!cb)(.*)$ index.php?/$1 [QSA,PT,L]</code>
Copy after login
Copy after login

回复内容:

目前规则,我想让他排除掉 cb 这个二级目录,就cb目录的话就不要执行这个重写路由,该怎么写啊。。:

<code> RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(!cb)(.*)$ index.php?/$1 [QSA,PT,L]</code>
Copy after login
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template