I want to disable iframe embedding pages, from my website to other websites and I make this js:
<script type="text/javascript">
if(document.referrer.indexOf("mydomain.com") != -1) {
window.location = "http://www.youtube.com/watch_popup?v=oHg5SJYRHA0";
}
</script>
Script works, but I have page01.php and page02.php
I want in page01.php source code insert iframe for page02.php
<iframe src="page02.php"></iframe>
When I do this I, got redirection to:
http://www.youtube.com/watch_popup?v=oHg5SJYRHA0
How to solve this? Thanks