I want to include a Wordpress blog that has been created on a subdomain of one of my websites with the use of an iframe stack in a certain project. (Reason: I couldn’t do in RW what my client expected from this subdomain)
I can’t figure out why the blog is not seen in my iframe page - other URLs are working.
There is an error:
Refused to display ‘http://prophetie.rundertisch.at/’ in a frame because it set ‘X-Frame-Options’ to ‘SAMEORIGIN’.
That means that they have set the header to SAMEORIGIN which means that they have disallowed loading of the resource in an iframe outside of their domain. So this iframe is not able to display cross domain
How can this be changed? I am the owner of the sub-domain on which this WP-blog is located, so this should be possible. But who can remove this SAMEORIGIN header, and where?
BTW, thank you for explaining the reason for the not-showing to me!
I’ve seen this issue crop up a couple of times here and there, so will offer what I think I know about it. Its a bit of a stinker though.
Short version:
The website owner has taken steps to prevent http://prophetie.rundertisch.at/ from being rendered in an iFrame on anything apart from on the site itself (SAMEORIGIN). This was achieved by the site owner by configuring X-Frame Options in their WebServer config.
Longer Version:
Chrome inspector tells us what has happened:
@Scott: Where do I need to put this code <?php header('X-Frame-Options: GOFORIT'); ?> in order for it to work?
@Stuart: Does that mean that if the WP-installation would not be in the subdomain but rather in a new folder on the same domain, that it would function? Would this be advisable or do I get into other troubles if I tried that? (I guess this could likely be a disaster of two people were working on the same directory, one with a WP installation, the other with RW…?) But just to clarify in my thinking whether I understood the basics.
@all: Which alternative solutions do you see to include the WP blog into a RW page than using iframe?
@Franz
If it is your WP site and your domain then perhaps the simplest approach would be to ask your hosting company to remove the X-Frame option thats causing the block.
I am rendering another webpage into iframe using curl getting same origin issues while clicking on some div
I have tried with <?php header('X-Frame-Options: GOFORIT'); ?>