Akhil F
Akhil F

Reputation: 7740

How can I have a same domain iframe disable same domain scripting

I have two pages which live within the same folder,

1) index.php 2) test.html

On test.html, there is an iframe with index.php as the source.

However, I'd like to disable javascript access to index.php from test.html. In other words, index.php should act like its on a different domain, even though it is on the same domain.

How can I accomplish that?

Upvotes: 1

Views: 139

Answers (1)

deej
deej

Reputation: 2564

most simplest way, is it possible for you to create a alias sub-domain pointing to your server? if so you can do that by doing following:

http://mydomain.com/index.php

and then call test.html by

http://myaliasdomain.com/test.html

See if this is possible or else we can think of different solution.

Upvotes: 1

Related Questions