470,866 Members | 1,943 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,866 developers. It's quick & easy.

BUG: _SERVER["SCRIPT_URI"] doesn't work right with subdomains.

I'm running scripts in a subdomain, and need a way to find the
correct URI of the path -- i.e. the path the browser would use
to the directory the script is executing in.

The PHP variables,

_SERVER["SCRIPT_URI"] or
_ENV["SCRIPT_URI"],

evaluate to "http://www.domain.net/dir/script.php".

instead of "http://www.SUBDOMAIN.domain.net/dir/script.php"

First is wrong, second is right. There IS NO SUCH URI as the
first one. Or if there is, it's NOT what's executing.

Somebody tell me it's not a bug, because it's possible to work
around it. Haha.
Jul 17 '05 #1
0 2759

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Juna | last post: by
3 posts views Thread by jx2 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.