i have url http://example1.com and it will redirect to http://example2.com

i am giving example1 as source url to my iframe which should redirect to example2 in the iframe but http://example2.com is not opening in iframe instead it is showing as new site.

is there any way that we can restrict.

i know this is iframe tag funcitonality but do i get some javascript code to restrict this.

Comments

neffets’s picture

Status: Active » Closed (fixed)

What is the URL of Your site in real, where I can see this.

Normally allways the redirecting URL is opening in the same iframe.

If it ends as "new" page with redirecting url as the master page, then You have some javascript on page 2 which enforces that it is opened in the parent window.
Iframes never do this by themself.