Hey all.
I'm trying to get a particular issue sorted for my site.
I've created it using frames, which, in hindsight, was a bad idea, but my overall lack of knowledge of how to do anything else prevailed.
Anyway, the issue I have is that when Google comes around to crawling my site, it may bring up pages to customers who will load them out of the context of the frames. After some searching, i've got a script on my index.html, and on each page, that if the page is loaded outside of the frames, redirects to the index.html, which in turn brings up the page they were on in the main frame of the site.
The problem I'm having, is that the script works for pages within the same directory as index.html, but refuses to work in subdirectories, where most of the pages are held. For example, /products/photography.html.
The code I've got on the page is as follows:
This doesn't seem to work, neither does adding a slash before the "products" folder.Code:<SCRIPT language="JavaScript"> <!-- function Framed() { if (!top.frames[1]) { location.href = "index.html?page=products/photography.html" } } // --> </SCRIPT>
Am I doing something really stupid? The script itself does, as I've got another page working.
Also, is this way of doing it likely to get my sites downgraded or removed from google, for what is essentially spoof redirection?
Thanks