What is the correct form action URL for network options pages?

Referring to Settings API in Multisite – Missing update message

It states that:

For network option pages the correct form action URL is:

wp-admin/network/edit.php?action=your_option_name

Note: without a ‘/’ in front

Okay. Let’s try it:

Obviously, my options form actually gets submitted to:

http://yourdomain.com/wp-admin/network/wp-admin/network/edit.php?action=your_option_page

Now, adding a ‘/’ in front:

Submits the form (correctly) to:

http://yourdomain.com/wp-admin/network/edit.php?action=your_option_page

That’s right in most cases, I think?

However, I got feedback from some of the users of my plugin, that they get this when submitting the options form:

Not Found The requested URL /wp-admin/network/edit.php was not found on this server.

Is this due to incorrect server configuration for that user, or should I actually stick to the following form action URL to make it work with different server paths:

** Form still submits to correct URL: **

http://yourdomain.com/wp-admin/network/edit.php?page=your_option_page

Would the latter form action URL work in all install paths that wordpress supports? (with subdomains, directory paths, etc.).
How about the different web servers: Apache, Nginx, IIS

yourdomain.com
yourdomain.com/wordpress/
subdomain.yourdomain.com
subdomain/yourdomain.com/wordpress/

Read more here: What is the correct form action URL for network options pages?

Leave a Reply

Your email address will not be published. Required fields are marked *