Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-03-19 05:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found