[pmwiki-users] How to reference the domain name

Eemeli Aro eemeli at gmail.com
Thu Apr 23 06:52:11 CDT 2009


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.

eemeli



More information about the pmwiki-users mailing list