user671891
user671891

Reputation: 165

How could I hide the url of a site within an iframe?

I have a site that has an iframe linking to another site with the following example iframe code:

 <html>
 <body>

 <iframe src="http://google.com" width="100%" height="600">

 </iframe>

 </body>
 </html>

So, for the above example, how could I prevent visitors from finding the url: http://google.com ?

Upvotes: 0

Views: 6731

Answers (3)

Antti Ryts&#246;l&#228;
Antti Ryts&#246;l&#228;

Reputation: 1545

You can write e.g. PHP or Apache rewrite to fetch the page from backend server. This has very little CPU overhead.

Upvotes: -1

James
James

Reputation: 979

You could nest an iframe in another site / page and point the iframe on your current page to that one.

This would obfuscate it to some degree but if someone is intent on finding the URL, chances are they will.

Upvotes: -2

Darin Dimitrov
Darin Dimitrov

Reputation: 1038790

You can't. Suffice to browse the source code and see it. And even if you try to put this in an obfuscated javascript file which will dynamically set the src property of the iframe nothing can't be hidden from the Net tab in FireBug. So I would recommend you not wasting your time with this.

Upvotes: 5

Related Questions