Welcome Guest, Not a member yet? Register   Sign In
Problem with cross domain, jquery and subdomains
#1

[eluser]Patroklo[/eluser]
Hi
I have a problem with my web. I have added subdomains to some webs instead of using the uris of the controllers. For example:
subdomainname.domain.com/whatever

whould work in codeigniter as: domain.com/subdomainname/whatever

Until now I haven't had any problem with this way of working. It requires some more work for everything but everything goes very well.

But the problem starts when I want to use a post method via jquery. In this pages I have a comment system that calls a controller to send the post, like "domain.com/comments/new_comment (for example)" and it stores the comment in the database and sends a callback to reload the comment list; but the browser considers this a cross domain posting and don't do anything.

¿Is there anything that I can do to solve this? I have complete access to the two servers sides. In fact I can't beleive that the browser consider them different domains when both are the same codeigniter server and installation.

Thanks!

(and sorry about the bad english! I expect to make myself clear, if there is something you can't understand, please, ask freely)




Theme © iAndrew 2016 - Forum software by © MyBB