http://www.perlmonks.org?node_id=67837


in reply to load a script at one location BUT the browser thinks im somewhere else.

I don't believe that you can tell the browser that it is at a different location than the location that it requested. For example, if the user requests www.mysite.com, (I believe) there is no way to tell the browser that content is being returned from a different address.

mod_proxy may be what you are looking for, but that may be overkill.

If I correctly understand what you want to do, you could have users request documents from http://www.myothersite.com/helloworld.html? and use Apache's ScriptAlias directive to execute /cgi/myscript.cgi. This has worked for me in the past, allowing two host names to map to one script. It also allows for testing of the host name (using CGI.pm's url() method) to provide slightly different/tailored output depending on the host requested.

  • Comment on Re: load a script at one location BUT the browser thinks im somewhere else.