我有两个htaccess文件,一个用于根文件夹,另一个用于公用文件夹。我的问题是我收到错误,因为已经处理了对favicon.ico的请求。我如何停止对favicon的处理?
下面是我的.htaccess
个文件
:根文件夹
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond ^([^/]+)/?$ !^favicon\.ico
# Stop processing if already in the /public directory
RewriteRule ^public/ - [L]
# Static resources if they exist
RewriteCond %{DOCUMENT_ROOT}/public/$1 -f
RewriteRule (.+) public/$1 [L]
# Route all other requests
RewriteRule (.*) public/index.php?request=$1 [L,QSA]
</IfModule>
:公用文件夹
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond ^([^/]+)/?$ !^favicon\.ico
RewriteCond %{REQUEST_URI} !^/images/
RewriteCond %{REQUEST_URI} !^/javascripts/
RewriteCond %{REQUEST_URI} !^/stylesheets/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?request=$1 [NC,L]
</IfModule>
公用文件夹位于根文件夹
中