Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by sutch (Curate)
on Mar 28, 2001 at 19:16 UTC ( #67837=note: print w/ replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://67837]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2014-10-02 05:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (49 votes), past polls