Welcome Guest, Not a member yet? Register   Sign In
Deny direct access to the file.
#1

Hello everyone !

As can be to deny direct access on exiled to files in the directory "assets",

in General need do so, to under appeal say to example.com/assets/Favicon.png the user saw page 403 or any other,
but at the same time that this picture was available for inserting it in
PHP Code:
<head>
     <link .... rel="icon" src="<?= base_url('assets/Favicon.png'); ?>" >
</
head

and it was displayed on the site tab.
I would change this world, but God doesn't give me the source.
Reply
#2

There’s no way to do that. Your assets (images, js, css) must be publicly available. If the browser can read the favicon file and display it, then the user can also read it.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
Reply
#3

(11-27-2019, 06:55 PM)includebeer Wrote: There’s no way to do that. Your assets (images, js, css) must be publicly available. If the browser can read the favicon file and display it, then the user can also read it.
well, thanks for the answer!
I would change this world, but God doesn't give me the source.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB