InfoAuch

WebDirect Retreive the actual domain adress

Discussion created by InfoAuch on Mar 15, 2017
Latest reply on Mar 16, 2017 by InfoAuch

On a WebDirect application designed for a museum, I am displaying photographes of museum items. These photos are stored in the conf/database folder. There are not linked with the database because there are already like 15,000 photos (might have several per item). It is not possible for users to insert photos in a container. To many. Photos' names are constructed with the item number. I am using to display them a php script, called by a web object, with the item number in input. I can then managed to display the correct photo. Up to there this is fine.

 

I have to set the URL in the Web Container. If I set the domain to my local network, then photos cannot be displayed over the internet. If I set the domain as the Internet address, then each time I access a photo from inside network, the photo is retrieved from the outside. This is not optimized at all.

 

So I would like to construct the URL following the actual domaine used by the user. But the Get(HostName) function returns the server name, doesn't matter from which URL the database is accessed. Is there a way the get this domain name ?

 

Thank you

Outcomes