I am not sure if what I want is actually possible but is seems to at least partially work so I would like to know if someone knows more a bout aliases and references to image files.

What i would like to achieve is a encrypted folder that behaves like any other folder (without buying extra software).

I do this by:

1) creating a encrypted disk image using disk utility
2) mounting the image
3) creating a alias to the mounted image using CMD+L
4) change the icon of the alias file so that it resembles a directory

If I now eject the disk and try to open the link it will ask me for the password, and immediately open the image as it it were a directory (it will even show as a directory in column view).

The above even seems work when I store the image and link file on a network drive.
However in this case you will need to
1) first move the image to the network drive.
2) mount the image on the local machine
3) create the alias on the local machine (not on the server)
4) move the link to the server

also this makes the link behave like a encrypted directory.
However step 3 also contains the culprit of this method.

I my specific case I would like to also be able to open the alias when logged in on the server. however if I click the link in this case OS X tells me "the server "xxx" is available on your computer. Access the volumes and files locally".

I guess this is understandable and would be solvable by creating a 2nd alias or opening the image directly. However I was wondering if it was possible to edit the alias to make it somewhat independent of the machine it is opened upon (for example by entering the IP adresss i.s.o. te server name).

Also what I don't understand yet is how the above actually works.
I understand that the alias refers to a file in /volumes/ apparently when it can not find the file there (because the drive was ejected) it will try to mount it from a different location (the network share).

However if this it the case why does the same not work when I try to use the alias directly on my server.