1- http://sharepointcoding.wordpress.com/tag/infopath/
I already have a site at the root so that was not the solution for me.
2- http://littletalk.wordpress.com/2008/04/24/publishing-infopath-to-sharepoint-the-following-url-is-not-valid-error/
Same as above.
3- http://www.sharepoint-tips.com/2007/02/publishing-infopath-to-sharepoint.html
Although Ishai is suggesting that you should stop the Event Notification service on the server before you publish then re-start it again as soon as you finish publishing, I did not want to stop the service. This is because the service is running on a production server and there are other related services that require the System Event Notification service to be running.
What resolved the solution in this case is the following method:
By comparing two servers, the non-working site had this missing host header line item. The
X-Powered-By: ASP.net
was there in both site but the non-working site was missing the
MicrosoftSharePointTeamServices: 12.0.0.xxxx (depending on the service pack version)
By comparing the other sites on the non-working server I was able to get the correct value for the service pack in my case it was 12.0.0.6219.
Now the server is fixed but the client machine still needs to update a few keys in the registry so that it can find the server. To do this, regedit.exe and find the key: HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\Internet\Server Cache\
Delete entries for nonworking site (they are in this format
http://theNon-WorkingSiteName)
(You can also Version DWORD to c (12) but it is better to delete all the keys so that the next time you connect, these keys will be updated)