hotlink protection and system language...

3 posts / 0 new
Last post
#1 Wed, 06/17/2009 - 07:31
neorf

hotlink protection and system language...

i've to fix 2 things: 1- enable hotlink protection for every image on every virtual server. 2- change not the system language, but only when you use the php function date('M',time()) to show the month in italian and not only english. ubuntu installation is in english, so is there this option or not? have i to manually rewrite the month's language? thanks

neorf

Wed, 06/17/2009 - 09:34
ronald
ronald's picture

for 1 you can have virtualmin create .htaccess files (server templates), for instance through the /etc/skel dir. in there you'd have

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]

for existing domains you'd have to do this manually.

2 i dont know

Wed, 06/17/2009 - 09:40
ronald
ronald's picture

You can probably use this in a php.ini or in the server template under Apache website - Directives and settings for new websites

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?$DOM [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
Topic locked