我当前的 .htaccess 代码如下:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
# Get rid of index.php
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]
# Rewrite all directory-looking urls
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
# Try to route missing files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} public\/ [OR]
RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
RewriteRule . - [L]
# If the file doesn't exist, rewrite to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
</IfModule>
发送
requests /index.php/path/to/module/ to "index.php"
AcceptPathInfo On
@todo
这在某些情况下可能无效
FileETag Size
现在,我想将一个脚本与这个 htaccess 集成......这是脚本所说的......“添加exception
以执行 /cometchat 目录及其在服务器上的子目录中的所有 index.php 文件。”
那么,如何添加异常以Index.php
从该目录执行,同时不妨碍现有.htaccess code
...