Let me know if I haven't understood your question correctly, but I think what you want is to use a regular expression:
if ( !preg_match("/~hebjo\/fgberlin05\/forum\/templates\/LastCrusade\/images\/(.*?)/", $REQUEST_URI) ) {
...
}
The (.*?) is optional - it basically just says to match any number of characters.
e