Forcing a page to load itself in another page's iframe

Posted by bufferz on Stack Overflow See other posts from Stack Overflow or by bufferz
Published on 2010-03-31T00:43:08Z Indexed on 2010/03/31 1:13 UTC
Read the original article Hit count: 377

Filed under:
|
|

I'm a fairly inexperienced web designer learning css/html on the fly for a company's web site.

I want to keep menus, banners, etc in one document so I don't have to repeat updates across many documents.

My solution was to make an index.aspx file with the menus and headers, then have a simple iframe for content. This works quite well and updates easily.

the format is:

  • www.site.com/index.aspx?page=page1.htm
  • www.site.com/index.aspx?page=page2.htm

The problem -- Google is indexing my iframe'd pages and linking to them directly:

  • www.site.com/page1.htm
  • www.site.com/page2.htm

How can I set up redirects to page1.htm forwards to index.aspx?page=page1.htm without creating a "hall of mirrors" effect inside the original iframe?

© Stack Overflow or respective owner

Related posts about asp

Related posts about css