开发者

External form causing wordpress 404 error

I have a file outside a Wordpress install which contains a form that submits to itself. I can access and fill the form out. The form submits and reloads as expected without validation, but when using javascript to submit the form I receive a Wordpress 404 error. The URL of the file stays the same when receiving the 404 error. If I refresh the page it works fine (without 404 error).

I don't know what the difference would be between the two methods of submitting the form. Why would Wordpress get involved in one over the other?

I guess a simple solution would be to update my .htaccess mod_rewrite rules to explicitly ignore the file, co开发者_开发技巧uld anyone help with that?

Any other suggestions as to the differences between the two methods (form submit v.s javascript submit) would be greatly appreciated, I just can't think of why this would happen.


I tracked down the issue to the form processing. Looking in the logs I found a "Premature end of script headers" error was throwing a 500 Internal Server Error, resulting in a 404 error while trying to use an ErrorDocument to handle the request... the 404 was being handled by wordpress. The premature end of script was caused by some mysql connection code... but in other cases could be caused by an emailer or other form processing scripts. Hope that helps others who run into this problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜