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 go开发者_Go百科ing 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.
RewriteEngine On
RewriteCond   %{HTTP_REFERER}  !^http://www.yourdomain.com/.*$ [NC] 
RewriteRule   ^/otherdomain/*$ /page-not-found.php
Please refer this link
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论