bu kod işini görür

<script>
if (window.top.location != window.location) {
window.top.location = window.location;
}
</script>