How do I get Dean Allen's Refer to show destination hostnames as well as $REQUEST_URI?
March 8, 2004 4:05 PM   Subscribe

How do I get Dean Allen's Refer to show destination hostnames as well as $REQUEST_URI?

I wish to use Refer across several subdomains on my site, but the script uses only $REQUEST_URI. As a result, when I get hits to a subdomain contained within another subdirectory, the referral appears to have gone to refer.brownpau.com/[$REQUEST_URI] rather than its actual location.

I have my eye on the line that goes $uri = dbPrep('REQUEST_URI');
posted by brownpau to Computers & Internet (2 answers total)
 
After a very quick glance at the code, your intuition seems reasonable. I'd guess that the following might be a quick and dirty solution (as a replacement for the line you quoted):
$uri = dbPrep('SERVER_NAME') . dbPrep('REQUEST_URI');
All that should do is add the server name to the uri. I can't be responsible if that code breaks anything though [which it very well might]. I'd suggest you try emailing the author.
posted by kickingtheground at 6:09 PM on March 8, 2004


Response by poster: That's done it, thanks. I haven't gotten all my reserved globals memorized, and I missed SERVER_NAME.

As for emailing the author, he seems fairly busy with TextPattern and his cute dogs, so I decided to try for the open community tact instead.
posted by brownpau at 10:46 AM on March 9, 2004


« Older Niagra Falls   |   Disposing of Used Batteries Newer »
This thread is closed to new comments.