Issue Summary
I have created a multisite from scratch and I have encountered an issue related to the router mode being defined on localhost.
The issue occurs when adding a new site.
For instance adding a site with the “subdirectory” URL:
The : character in domain is purely dropped:

If we try to edit it to add :, it’s completely dropping the port value to end up with just http://localhost/subdirectory.
While searching for an explanation, I’ve found this post saying we can’t use other ports than :80 or :443 so I wonder if this couldn’t be related to it.
In any case, it’s not perfect but I’ve found a simple workaround, editing the domain in database this way:
siteurlinwp_x_options(wherexis the id of the site)homeinwp_x_options(wherexis the id of the site)domaininwp_blogsfor the corresponding site
Troubleshooting Questions
So the question is: is this something expected (I don’t think so) or have you ever encountered this case?
As there is a workaround, this is not blocking hopefully. But it may be nice to cover this case I think. ![]()
Replication
- Router Mode with localhost
- Multisite - Subdirectory
- Environment: PHP 7.4 / nginx 1.16 / MariaDB 10.4
System Details
I’m not sure this is relevant, but still:
- Local 5.10.3+5332
- Windows 10 Pro
