Jump to content

Hiding URL in browser address bar


dpc

Recommended Posts

Hi,

I want to be able to hide the address the browser shows for a web site.

For example, I want a domain such as domain.com to display in the browser but then load up in the page (in frames or similar) mydomain.com.

I've looked at frames but they still show you the address in the status bar and the properties of the page will still be of mydomain.com. I've also looked at mod_rewrite but it still shows mydomain.com after clicking a link or visiting an address.

 

Am I able to accomplish this using PHP? I've looked at base64 encode and decode functions but I'm unsure as to how to use these best.

 

Any ideas/links would be appreciated.

Thanks

Link to comment
https://forums.phpfreaks.com/topic/132125-hiding-url-in-browser-address-bar/
Share on other sites

you could use an iframe, but they can always right click on the iframe and get the 'real' URL

 

you could also use cURL or even the file functions to get the contents of a remote page, and redisplay it, but you will have lots of problems finding images paths, etc

If the initial website is yours, you can try what rhodesa suggests. I've got a function to convert relative paths to absolute (to deal with the problem rhodesa points out), that can be used together with e.g. file_get_contents() or cURL, for a pure PHP approach. But it would be tricky to make the user able to browse the 'external' website while still staying on your site.

I'm a relative novice in PHP so was just looking for some pointers really. I had the idea originally of domain.com/file.php?url=base64encoded but couldn't seem to figure it out

I will investigate cURL and file_get_contents() some more. Thankyou very much for your input everybody.

 

Basically, I have a number of websites, and I would like to display the contents of one through another, but I don't want the two websites to seem to be affiliated for commercial reasons.

I could always copy everything from one site to another but I wondered if there was another way as the sites are frequently updated independently of each other.

Long-term we are looking to use the same database with different 'white-label' front-end sites but that's not feasible in the short term

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.