Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatic favicon on sub-directories and files

Tags:

html

favicon

My friend recently provided me with some disk space on his VPS and gave me the use of http://IP/czdavid/. I am not currently in need of a domain name since it will serve me as a file sharing site.

Now, the problem is that he has his favicon on the root of the IP and browsers search for it there. I can resolve the problem on individual pages with <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>, the problem is that directory listing and actual files - images and text files and other opened in a browser - will show the domain favicon.

Is there any way to set a favicon for the entire sub-directory, short of getting a domain name?

like image 403
David Polák Avatar asked Oct 11 '22 23:10

David Polák


1 Answers

No, this is not possible.

favicon.ico will be retrieved from the root of the site, unless specified in a link element on an HTML page.

like image 176
Oded Avatar answered Dec 09 '22 06:12

Oded