404 for "favicon.ico", but not other files

#1
Hi,
I'm shared hosting user (CPanel) that's powered by LiteSpeed web server. And running into following anomaly:

I have a bunch of files under /home/account/domain.com/public/images/
Code:
/home/account/domain.com/public/images/favicon.ico
/home/account/domain.com/public/images/some.ico (copy of favicon.ico)
/home/account/domain.com/public/images/some.png (and other PNG files)
I also have this line in /home/account/domain.com/.htaccess file:
Code:
RewriteCond %{DOCUMENT_ROOT}/public/%{REQUEST_URI} -f
RewriteRule ^(.*)$ public/$1 [L]
^^ this suppose to make anything in https://domain.com/public/images/file.ext accessible as https://domain.com/images/file.ext ... and it works great for all files except for the favicon.ico ! -- for this file I get error 404 page.

So,
https://domain.com/images/some.ico - displayed, expected
https://domain.com/images/some.png - displayed, expected
https://domain.com/images/favicon.ico - NOT Displayed!, unexpected
https://domain.com/public/images/favicon.ico - displayed

as if there's some server setting governs this specific file before it even gets to the .htaccess rules. But I don't see anything in CPanel.

Any ideas why this can be happening, or how I can troubleshoot it?
 
#3
Thanks for the reply!

This is the whole .htaccess
Code:
AddHandler cgi-script .pl
Options +ExecCGI

IndexIgnore *

RewriteEngine on

# -- force https --
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://domain.com/$1 [R,L]

# -- ensure real files in "public" folder are displayed directly as if they are in root --
RewriteCond %{DOCUMENT_ROOT}/public/%{REQUEST_URI} -f
RewriteRule ^(.*)$ public/$1 [L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ script.pl/$1 [L,PT]
should've posted in the the original post.. but I don't think there's anything else there that could cause it (?)
 
#4
another thing -- I have this piece of code in my script:
Code:
any '*' => sub {
    my $self = shift;
    $self->redirect_to('/');
};
with which if the file doesn't actually exist (https://domain.com/images/does-not-exist.png) it just redirects to the index page. But with the favicon.ico it actually shows 404 error, which makes me think whatever interferes is even before the .htaccess ( -- me thinking the issue is not in .htaccess rules ).
 
Top