Problem: The form will not send and redirects to same page

Posted by on Aug 15, 2010 in Tips, Troubleshooting

The form will not send and redirects to the same page. When I post the contact form it just redirects to the same  page, or I get an IIS error. I have a Windows IIS web server.

IIS is causing this problem. You can fix it by changing the permalink to always show  index.php in  the URL. Like this:

IIS does not like that there is no document file type in the URL (no .php, .htm, or .html).  The permalinks need to have in .php or .htm or .html in the URL because IIS servers will not display a page using an unknown document  type when the page is using GET or POST method.

Then why does this only happen on the contact form and not on the WordPress functions?
All the comment forms and other wordpress functions post to wordpress PHP files directly. The contact form uses the page URL and that is where permalinks can become an issue.

IIS needs to have index.php in the URL somewhere so it will allow the form POST request.

Try this setting in WordPress:
Admin – Settings – Permalinks
Custom Structure: /index.php


The contact form should work now.

A possibly better fix? switch to Linux hosting, I find that Linux servers have fewer problems like this:

Do you need more help?

Send us a Donation:

Donate to Mike Challis