Loading...
 
Features / Usability

Features / Usability


Re: Re: Re: Change hostname if users uses different host

posts: 4656 Japan

> I already tried this before, but this doesn't work.
> I think the $smarty.server.SERVER_NAME} is coming from the setting in the admin page, where you set the server name. And as you can only set 1 address, it's always giving that one.

$smarty.server.SERVER_NAME comes from the webserver as a PHP reserved variable. (See http://smarty.php.net/manual/en/language.variables.smarty.php and http://jp.php.net/reserved.variables.) I imagine the admin page setting is in case the Tiki admin wants something else indicated, as PHP/Smarty/Tiki — AFAIK --are able to know the domain name as part of their environment whether the admin inputs it or not. But if you put that Smarty statement in a template and it returned only one server name no matter which URL was used, then that's the one recognized as the environment and some other way is needed.

-- Gary

There are no comments at this time.