Joomla!, Wordpress tips for building your site

Joomla!, Wordpress tips for building your site

Syndicate this site using RSS

How to disallow by iframe tag

Published on| January 14th, 2010 | No Comment.

If your site is very famous site, it might be copied by the bad.
In addition, the bad might quote your site by iframe tag without copying it.

I found the script that the bad can not quote your site.
Following content might help you.

java script

You should set the following codes after body tag.

<script type="text/javascript">
if (window.top !== window.self) {
	document.write = "";
	window.top.location = window.self.location;
	setTimeout(function() {
		document.body.innerHTML='';
		}, 1);
	window.self.onload = function(evt) {
		document.body.innerHTML='';
	}
}
</script>

OK.
This code will redirect to your page URL if your page URL do not equal request URL.

You must see that you will get good result only access from users that enabled java script by this way.
Another way will use ‘.htaccess’ file.
So, it will control that allow of access to directory.


Add to your favorites(bookmarks): はてなブックマークへ追加するdel.icio.usLivedoor ClipYahoo!FC2Nifty ClipPOOKMARK. AirlinesBuzzurl(バザール)Choixnewsing

Trackback URL

After Admin approves this comment, it will be shown.


Comments

Leave a Reply





*