php - Seo Friendly URL with Rewrite
I have a links on my site like;
campaigns.php AND product.php?id=5
After some research, i have converted them to;
campaigns AND product?id=5
With this 2 rule:
<rules>
<rule name="hide.php" enabled="false">
<match url="^(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}.php" matchType="IsFile" />
</conditions>
<action type="Rewrite" url="{R:0}.php" />
</rule>
<rule name="redirecting.php" enabled="false" stopProcessing="true">
<match url="^(.*).php$" />
<conditions logicalGrouping="MatchAny">
<add input="{URL}" pattern="(.*).php$" />
</conditions>
<action type="Redirect" url="{R:1}" />
</rule>
</rules>
But they are not enough, i want to convert them to;
if possible;
product/name/productname
if not;
product/id/5 will be enough.
ALSO, i need to exclude NTK folder from this rewrite engine.