469,344 Members | 6,672 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,344 developers. It's quick & easy.

Same Origin Policy and domain aliases

Hello all,
Please forgive me if this is a simple question - I'm new. I'm using Javascript to create an XmlHttpRequest object to allow client pages to call PHP scripts on a server. IPs in the form www.myserver.com and http://11.111.111.11 work as expected but an alias in the form alias.myserver.com causes an http request made to the server to be denied with the error message "permission denied". I've tried passing the alias in the URL of the http request call, modifying the chmod values for the files and directories involved with no success. The alias appears to be correct in that I see the page I expect to see - http requests just won't work. Does anyone have any suggestions? Thanks!
May 15 '07 #1
3 1684
acoder
16,027 Expert Mod 8TB
Welcome to TSDN.

I can give you one possible suggestion. For the page that you are trying to access give the full address (including the http). See if that works.
May 16 '07 #2
Welcome to TSDN.

I can give you one possible suggestion. For the page that you are trying to access give the full address (including the http). See if that works.
I'm guessing you mean passing the full address in the url aparam of the XmlHttpRequest. I tried that, but it didn't work. After researching, my understanding is that javascript included in an html file is interpreted as being from the same domain as said html. The function that creates my XmlHttpRequest object is in a javascript file included in the html that is sent to the client. To my understanding this should negate any cross domain issues, but yet it doesn't seem to.
May 16 '07 #3
acoder
16,027 Expert Mod 8TB
Where is the javascript file located?
May 17 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Randy Webb | last post: by
1 post views Thread by success_ny | last post: by
4 posts views Thread by Turko | last post: by
7 posts views Thread by funktacular | last post: by
2 posts views Thread by Jeremy J Starcher | last post: by
2 posts views Thread by jackchang1 | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.