Forum Moderators: phranque

Message Too Old, No Replies

Is it possible to "fake" a URL?

         

nickf

5:17 pm on Jul 11, 2008 (gmt 0)

10+ Year Member



Hi,

I have an address, www.x.com say, that redirects to a folder at another address I have, www.y.com/folder1/ . Is there anyway to change the URL in the address bar on www.y.com/folder1 when it loads so it shows up as www.x.com? If so, how do I do it? I don't need to use mod_rewrite if there's some obscure PHP or JS solution I don't know about, but I'm much too inexperienced with mod_rewrite to be able to address this without help. Can anyone tell me how to do it? Thanks.

jdMorgan

10:43 pm on Jul 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This can be done using Apache mod_proxy, with all requests to y.com passing through x.com, and all responses from y.com passing back through x.com. This places some additional load on x.com, and all accesses logged on y.com will show x.com as the requestor, unless you set up custom logging.

Otherwise, the URL of a resource is the URL of that resource -- You can redirect it or proxy it, but you cannot change it.

Jim

nickf

11:15 pm on Jul 11, 2008 (gmt 0)

10+ Year Member



Thanks Jim. Will mod_proxy have to be set up on x.com or y.com? And would it be a forward or backward proxy? Thanks.

jdMorgan

11:24 pm on Jul 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A reverse proxy on x.com is what you're looking for, and custom logging on y.com will be needed if you need meaningful 'stats'.

This is not a trivial undertaking, so spend a day or so reviewing mod_proxy and the tutorials on the Apache site before deciding if you really want to get into this. If you have problems, you may need to hire $pecialized help. So decide up-front if it's worth it.

Jim

nickf

12:17 am on Jul 12, 2008 (gmt 0)

10+ Year Member



Unfortunately (or fortunately), I don't have the capabilities to even do this given the way x.com has been set up. Anyway, it was good to learn, though I don't know the details and will hold off on learning them until I really need to. Thanks for your help!