I have a site with a main domain with several subdomains. I use an AJAX call to send out emails. It works fine from the main site (www), but not the microsites. My file structure is:
/www
emailsend.php
/sub1
emailsend.php
/sub2
emailsend.php
/sub3
emailsend.php
And the domains are www.hawksite.com, sub1.hawksite.com, sub2.hawksite.com, sub3.hawksite.com. Here is the call:
$.ajax({
url: "/emailsend.php",
data: { loc: locString, mes: message}
});
When I check the inspector, the xhr request is to
http://sub1.hawksite.com/emainsend.php
but I get a 404 not found error. The site is built in Expression Engine if that makes any difference.