I tried the steps below to set up url rewrite for SharePoint 2016 host named site collection.
https://www.imaginet.com/2017/step-step-tutorial-iis-redirectrewrites-sharepoint/
for symmetrical rewrite mentioned in
https://support.microsoft.com/en-us/office/supportability-of-rewrites-and-redirects-in-sharepoint-2016-2013-2010-and-2007-a74a19f2-a59a-4b39-8be4-ce63e50139fa?ui=en-us&rs=en-us&ad=us
But the rewrite failed. I wonder whether it works for SharePoint 2016 host named site collection?