I spent nearly a week of work before I got this error figured out.
I was trying to publish a form that I succesfully published to all development servers to a test server. Every time I tried to publish it would say "the following url is not valid" when I entered the path to the sharepoint site.
Searching the internet, I found some possibilities, but none worked. For the sake of people who encounter this error, I will outline my troubleshooting recommendations below:
Make sure the sharepoint application that contains the site you are publishing to has a site in the root.
That was my mistake (mistake?). If you create all the sites under a virtual path such as "/sites/", infopath cannot publish.
So make sure there is a sharepoint site on the "/" path.
Create a new SSP.
I have no idea why, but people on the internet claimed this solved the problem they had.
- If the sharepoint in question is of version 2003, uninstall .NET2 from the server. Again, no explanation was given, but one post in the news groups claim it solved their problem (and probably started a lot of others...)