I have a page that I would like to be accessed only in an iframe.
I wish I could use the common javascript.
<script type="text/javascript">
if(top==self) {
top.location.href = "../index.php";
}
</script>
This works fine to redirect if the page if accessed outside the iframe.
But inside the frame I get.
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/MiniManager/header.php:7) in /var/www/MiniManager/header.php on line 17
I can see the page after this after this.. but the login functions do not work for the page.
Without the script it loads and function fine in the iframe. Logins and all.
Is there a way to do this in php and not javascript?
Like a...
if (header(Location: blahblahURLhere)) make this the top location
Is this possible?
Another possible solution...
is there a way in .htaccess or chmod.. that would prevent access to the MiniManager directory completely, unless accessed via the iframe?