Stumbled upon this old post when I was trying to solve the same problem.
SOLVE!
Using the Reuse URL Function in IIS Manager I created a friendly URL rule.
This worked fine, and when I looked at the rule in the web.config (www root) file, it showed 1 rule for redirection and 1 rule for rewriting.
I edited it for 1 match. Then I simply duplicated this code, editing the product identifier for each. Example below:
<rule name="RedirectUserFriendlyURL1" stopProcessing="true"> <match url="^product\.php$" /> <conditions> <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" /> <add input="{QUERY_STRING}" pattern="^id_product=\b35\b" /> </conditions> <action type="Redirect" url="990mm-bohemia-cast-iron-electric-radiator" appendQueryString="false" /> </rule>
The first rule looks for the string "product.php" in the URL and "id_product=35" , then redirects to "990mm-bohemia-cast-iron-electric-radiator" , which does not currently exist. Then (see below)
<rule name="RewriteUserFriendlyURL1" stopProcessing="true"> <match url="^\b990mm-bohemia-cast-iron-electric-radiator\b" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="product.php?id_product=35" /> </rule>
This rule overwrites the "product.php?id_product=35" bit with "990mm-bohemia-cast-iron-electric-radiator", creating a new redirection location.
DANINTHETOON
source share