Support

Admin Tools

#36030 Forbidden to show favicon .png files in root

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by sandvalley2019 on Tuesday, 26 October 2021 03:07 CDT

sandvalley2019

Hi there,

I have some png-files in my root for favicons, for instance https://bcsteenwijk.nl/apple-touch-icon.png

But as you can see it is forbidden to show it in the browser.

There is a way to enable to open .png files in directories in the root-folder (and I did this for some filders like the template folder in 'Frontend file types allowed in selected directories'), but how can I enable this in the rootfolder itself?

Kind regards,
Peter

nicholas
Akeeba Staff
Manager

You should allow the individual files in the “Allow direct access to these files” section of the .htaccess Maker. This applies to any and all files in the site's root — except for Joomla's index.php — you need to allow access to.

It should also be noted that it's best to not have the site ‘favicons’ images stored in the site root. It's best to have them in the media subdirectory for your template, a subdirectory of the images folder, or a subdirectory in your template folder in this order of preference. Also note that you should not expect browsers to “discover” these files, you should explicitly state them in the HTML output of your site either by modifying your template directly or by using a third party extension. ‘Favicons’ are communicated through <link> tags in the header and include not just the file name but also the resolution of the image. 

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sandvalley2019

Thank you Nicholas. The first solutions works fine, but I will use the better solution you provided and place the favicon-images in the template-folder and modify the <link> elements.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!