Not sure how to write this up, so I am going to give it a shot.
You have two nearly identical URLs, except that one has an Extra Query Value.
site.com/Main.asp?Type=User&UN=YourName
Copy
Search Site
Search Google

&
site.com/Main.asp?Type=User&UN=YourName&WhereAmI=ASP
Copy
Search Site
Search Google

Now, we want to apply a URL rewrite to these.
site.com/User/YourName
Copy
Search Site
Search Google

&
site.com/User/YourName/ASP
Copy
Search Site
Search Google
In our web.config, we will do something like this.
We don't want to have two different URLs for these, since they are in the same area on the website.
[web.config URLRewrite]
CFFCS | CarrzSynEdit: | ASP.NET (VB/C#)

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
        <rewrite>
            <rules>
<!-- Add the Rewrite with Extra Query at the top -->
<rule name="UserWhere" stopProcessing="true">
    <match url="User/([_0-9a-z-(-)-,-.-]+)/([_0-9a-z-(-)-,-.-]+)" />
    <action type="Rewrite" url="Main.asp?Type=User&UN={R:1}&Where={R:2}" appendQueryString="true" />
</rule>
				
<rule name="User" stopProcessing="true">
    <match url="User/([_0-9a-z-(-)-,-.-]+)" />
    <action type="Rewrite" url="Main.asp?Type=User&UN={R:1}" appendQueryString="true" />
</rule>
<!-- Add the Rewrite With Single Query at the Bottom -->

            </rules>
        </rewrite>
</system.webServer>
</configuration>

Here, we use the same URL; on the second, we apply a different rule name so that we can reuse the same URL Type=User
Copy
Search Site
Search Google
.
We place the Main Rewrite Rule at the bottom of the stack, so it first checks whether there is a reference to the Where Query; if not, it proceeds to the Main Rule and activates it.
This keeps it clean and organized, making everything flow much better.
Now that I have learned this, I will implement it on our Main site, which will be a nightmare to do since it is already live.