Reputation: 21
I have a site that simply opens images in a browser with no page code:
www.mysite.com/images/pic.jpg
I want to add a different favicon when the pictures are opened in the browser window.
I tried putting the following inside the /images folder but no luck:
RewriteEngine On
RewriteRule ^favicon\.ico$ /images/favicon2.ico
Any ideas?
Upvotes: 2
Views: 324
Reputation: 16825
The browser always checks for favicon.ico
in the root.
The only way of telling the browser to use another file is by putting <link rel="shortcut icon" href="/otherfavicon.ico">
inside html. So this will only work for html documents.
So when a picture is opened favicon.ico
is shown, but when a webpage is opened otherfavicon.ico
is shown.
Upvotes: 1