Reputation: 5968
I have an apex application hosted at a certain address which not very user friendly. Let's say : aaze_a442.com
I have another domain (which is user friendly) that redirects to the aaze_a442.com let's say : niceexample.com such that APEX application will be transparently accessed from niceexample.com
The redirection works nicely.
I'm trying to get the nice domain name from PL/SQL. As a result I'm expecting to get : niceexample.com
I'm using the following query :
SELECT SYS_CONTEXT('USERENV','SERVER_HOST') FROM dual;
But it doesn't return niceexample.com, it returns instead aaze_a442
Does anyone know how to get the domain instead of the host name please ?
Thanks
Upvotes: 1
Views: 1853
Reputation: 5968
Got the Answer :
OWA_UTIL.get_cgi_env ('REQUEST_PROTOCOL') || '://' || OWA_UTIL.get_cgi_env ('HTTP_HOST')
returns : https://niceexample.com
Upvotes: 2