这是我们用于 REST 框架的简单 htaccess 文件。
我只想排除一个文件/lib/MyFile.php
被重写。(所有请求都通过 index.php,因此需要 BasicAuth)
RewriteCond %{REQUEST_URI} !^/(static_files/.*)$
RewriteCond %{REQUEST_URI} !^/(lib/MyFile.php)$ // this is not working
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
该文件的完整 URL 是http://domain.com/lib/MyFile.php