1) rojetiGroup: Members Posts: 2Joined: 13 Mar 2008Location: IP: 200.61.--.--
Posted:
Hi,
I have a problem when I use rewrite for subdomains, it happens that when I enter this path: user.mysite.com
it redirects to www.mysite.com/default.asp?id=user
Everything works fine except that I get an error "Access Denied" on the HTMLHttpRequest line doc = iframe.contentDocument || iframe.document;
It doesn't happen when I go directly to www.mysite.com/default.asp?id=user
Sorry for my bad english
Thanks in advance!
2) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
Yes, that will happen as the domain name is different. Make sure you only ask the script to access files from the same domain on which it's currently running. This is a browser security rule (in browsers not supporting HTML5), the alternative would be to put a small CGI proxy script on the current domain and access other domains via that :).
- Angus.
3) rojetiGroup: Members Posts: 2Joined: 13 Mar 2008Location: IP: 200.114.--.--
Posted:
Thanks a lot!
You say that if I'm asking the script to load an asp file with the path "http://www.mysite.com/file.asp" instead I should ask for "http://user.mysite.com/file.asp" ?
Thanks in advance!
4) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 203.109.--.--
Posted:
I'm saying that if the script is running on http://foo.bar.example.com then you can only really request documents from http://foo.bar.example.com without doing some trickery.