Does anyone use Zeus or Easyspace? Help

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
f1nutter
Forum Contributor
Posts: 125
Joined: Wed Jun 05, 2002 12:08 pm
Location: London

Does anyone use Zeus or Easyspace? Help

Post by f1nutter »

I am trying to use .htaccess to prevent hotlinking to my images. I though my host, Easyspace, used Apache so set up .htacces accordingly, and it worked at home, but when I transfered to Easyspace it doesn't work because they use Zeus.

I have read the Zeus documentation which looks like a subset of Apache, with no Rewrite engine. So I am trying to prevent hotlinking using <Files> and having some curious results.

Code: Select all

<Files *>
 order deny,allow
 deny from all
 allow from "my-site"
</Files>
The first thing is my host doesn't seem to know its name! I set-up a php script to return some $_SERVER array entries. PHP_SELF worked, HTTP_HOST and SERVER_NAME returned nothing. But phpinfo() names these both as "www.f1nutter.com". I have tried all sorts of strings/expressions, even as loose as ^.*f1nutter.*$ which, I hope, matches anything with f1nutter in it.

The second problem is what to put in the <Files> directive. If I just put "deny from all" inside and wish to restrict every file I only get an error from <Files *> but if it uses regular expressions, shouldn't this be <Files .*>?

I guess what I am looking for will not look a million miles different from:

Code: Select all

<Files *.jpg>
 order deny,allow
 deny from all
 allow from ^.*www\.f1nutter\.com.*$
</Files>
It's made more frustrating by not being able to see error messages, and tracking this bug.

Cheers.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I'm not using Zeus (uhh, $1700 for a webserver ;) )

but "allow from <pattern>" you can imagine as "if (preg_match($pattern, $_SERVER['REMOTE_ADR']) > 0) $allowed = TRUE; else $allowed=FALSE;"
- so you only allow clients with your own domain-name getting the pictures.......
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

Try <Files ~*.jpg> or <FilesMatch *.jpg>, I don't have my apache reference in front of me, but is zeus is a subset, one of those might work...
Post Reply