|
If you do not want that everybody can see your page like the search engine spider see it, looking thru the cache. You can disallow your pages to be in the search engines cache using the meta :
<meta http-equiv="cache-control" content="no-cache"> |
|
But in this case your page will not have a PageRank, and your website will not be at its best level in search engines.
Then the only solution is to have your page in the cache and when someone is looking for your page cache on the search engine to redirect him to your main page.
As we do not find any answer to this question (April 2005), we have decided to do a small javascript for that. By this way you will have more visitors, all those looking the search engine cache.
All your web pages must be seen on your domain. This script will also redirect to your main page someone who have recorded your page on its HD, if he does not have a Javascript protection for local pages integrated in the browser.
<!-- Anti-Cache http//www.phpcontrol.com -->
<script type="text/javascript">
var domain = "my_domain.com" <!--replace my_domain.com with your domain name-->
var str=location.href
var pos=str.indexOf(domain) if (pos>=12 || pos=-1) <!--add to 12 the length of your longest subdomain name if needed-->
{
document.location.replace("http://www."+domain);
}
</script>
<!-- Anti-Cache http//www.phpcontrol.com -->
|
|
|