Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

fURL::getDomain always adds www.

posted by mygeeknc 8 years ago

I've ran into two instances where fURL adds www to the current domain when returned. I'm working with a subdomain test.domain.com and fURL returns www.test.domain.com

Is there a way to stop it from doing that?

I'm using the lastest version of Flourish and

<?php echo fURL::getDomain(); ?>

Return this

#!text/html
http://sl.localhost
posted by jmtucu 8 years ago

fURL uses $_SERVER['SERVER_NAME'] to get the domain name. I would imagine that your web server is somehow improperly populating the value. You could always try hard-coding it early in your init process:

$_SERVER['SERVER_NAME'] = 'mydomain.com';
posted by wbond 8 years ago

It was a server setting even though the URL was without the www. Kinda interesting though. Thanks guys.

posted by mygeeknc 8 years ago