.htaccess - deny downloading of files

Posted by user317005 on Stack Overflow See other posts from Stack Overflow or by user317005
Published on 2010-12-23T17:30:37Z Indexed on 2010/12/23 17:54 UTC
Read the original article Hit count: 193

Filed under:
|
|
|

I keep several fonts in the directory "/fonts/" on my server which I then load into my css files via @font-face. However, I want to make sure that people cannot download the file just by simply going to http://www.domain.com/fonts/fontname.ttf.

Can I somehow prevent this, and still be able to load the font files into my css files? Because I think putting deny from all into the .htaccess file will even prevent the css files for correctly loading the fonts.

I hope this makes sense.

© Stack Overflow or respective owner

Related posts about css

Related posts about .htaccess