This is maybe more of a web server question than a php one...
I have a site that houses its e-commerce component (a zencart) in an iFrame. I would like to find a way to redirect external traffic to the page with the iFrame; essentially to re-house the content. I have a general guess at the steps, but I think I'm reinventing a wheel, and my php is novice... Has anyone done this?
If I understand what you're looking for, I don't think PHP can do it but JS can. In the zencart page, (Probably index.php or in a header file in the template)
try something like:
HTML Code:
<script>
if (top.location = location){top.location = "http://www.mysite.com/webstore"}
</script>
I appreciate the reply; I think that solution will work for me in a basic way. I'm pretty sure I still need to use a session variable or POST or something if I want to tell the original (wrapped) page the actual URL they want put into the iframe (rather than just dumping them to the store-front), though. Any thoughts?
Bookmarks