My Website is hosted in CDN and is developed using wordpress. I have a form on frontend. The problem is, when I submit a form it is showing a 404 error. I have given the full link of action page in form. But it is still going to same 404 page. This form worked correctly when CDN is disabled. Is this the problem of using cdn? then, how can i submit a form in CDN hosted website?.
If my form is like
<form name="form1" action="domain.com/target.php" action="post" >
<input name="field1" type="text" />
<input name="field2" type="text" />
<input type="submit" name="submit-form" />
</form>
Where should I point target of my post requests?.
I know that it is possible to workout a form in CDN hosted website.
We are using Wp-poll plugin in our site and is based on ajax .It is working fine.
I am ready to change the form to ajax also. I know how to send a post request using jquery post. But how can I done the same in CDN? . Where should I point my post request’s?. Please provide some examples. Please explain, how wp-poll worked out the same?
Your question is a little light on detail, but in general a CDN provider only serves static files – it can’t run server side code. Therefore, the target of your POST request can’t run on the CDN.
However, the most likely cause for a 404 is that the file you’re POSTing to doesn’t exist – you’ve either not uploaded it to the CDN, or you’ve directed it at a URL that doesn’t exist.