Because of Same Origin Policy, I want to send my form via a proxy to another website. So add this to virtual host configuration:
ProxyPass /submit http://another.website.com/
ProxyPassReverse /submit http://another.website.com/
That works. And my form successfully posted with no errors. But, there are 2 problems:
cookies don't go with the request. I want to include cookies related to
another.website.com
with myAJAX
request.I set a cookie in destination page (which I post my form via a proxy to it), with this code:
setcookie("TestCookie", "blah blah", time() + 3600, '/', '.another.website.com');
but, when try to get that cookie on http://another.website.com/search, I can't find this. and
$_COOKIE['TestCookie']
is NULL. (Firebug also doesn't show that cookie)
Edit: 2nd problem solved. (I can't set cookie for another domain, what I did).
Edit: The form is on "localhost", and I want to submit it to "another.website.com".