GluePHP and Prefixes?

52 views
Skip to first unread message

david russo

unread,
Jun 14, 2010, 3:59:12 PM6/14/10
to GluePHP
Hey there,

I'm curious how does glue handle prefixes/subdomains. I.e. I'm
working on a project, a fairly simple one and I'm wondering if glue
can handle {this}.domain.com.

Thanks,

Dave

Joe

unread,
Jun 14, 2010, 4:09:45 PM6/14/10
to GluePHP
Hi Dave,

> I'm curious how does glue handle prefixes/subdomains.  I.e. I'm
> working on a project, a fairly simple one and I'm wondering if glue
> can handle {this}.domain.com.

Glue only looks at $_SERVER['REQUEST_URI'] which does not include any
host-specific information.

I have not tested this, but you might be able to get it to work if you
modify the glue.php file so that:

$path = $_SERVER['REQUEST_URI'];

is replaced with:

$path = $_SERVER['SERVER_NAME'] . '/' . $_SERVER['REQUEST_URI'];

and then create your $urls mapping to include the full domain.

Again, not tested, but it's a possibility.

Thanks,
Joe

david russo

unread,
Jun 14, 2010, 4:14:51 PM6/14/10
to GluePHP
I'll test this out and let you know.
Thanks for the speedy reply!
Reply all
Reply to author
Forward
0 new messages