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?


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.)? [NC]
RewriteRule .(jpg|jpeg|png|gif)$ - [NC,F,L]

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

2 i dont know

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]