[pmwiki-users] How to reference the domain name

Kartik Mohta kartikmohta at gmail.com
Thu Apr 23 08:15:28 CDT 2009


On Thu, Apr 23, 2009 at 5:22 PM, Eemeli Aro <eemeli at gmail.com> wrote:

> 2009/4/22 Randy Brown <randy at brownragfilms.com>:
> > By "URL masking" I mean I tell my domain registrar to forward
> > (selecting frame redirect as opposed to http redirect) to the wiki URL
> > destination, specifying the title that I want to appear.
>
> This means that the server might not have any information about your
> masked domain, as it all happens in the browser. However, I can think
> of two things to try:
>
> First, check the value of $_SERVER['HTTP_REFERER'], it might hold your
> domain name at least on the first request.
>
> Second, since the masked domain is seen in your browser, it should be
> accessible by JavaScript as top.location.href. Now, in order to get
> that info to your server, it's probably easiest to set that value to a
> cookie that'll then be passed back to the server, where you can read
> it and set the page titles etc. accordingly.
>
>
You can alos try printing the whole $_SERVER array by:
print_r($_SERVER);

-- 
Kartik Mohta
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090423/ca9c1e48/attachment.html 


More information about the pmwiki-users mailing list