How can I change the web rewrite url from (u/username) to (/username) like instagram.com/username
My web.config:
<rewrite>
<rules>
<rule name="Rule 1">
<match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" />
</rule>
<rule name="Rule 2" stopProcessing="true">
<match url="u/([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
<action type="Rewrite" url="/index.php?url=profile&username={R:1}" appendQueryString="false" />
</rule>
</rewrite>
I tried some rules before but I can't figure it out.