Hi.. I m asp programmer and hosted one website at godaddy windows server with iis-7 Name of my website is http://www.theoutletscenter.com Now I want to rewrite url to make them seo friendly.. I want to rewrite this url. Orignal url - http://www.theoutletscenter.com/product.asp?ID=7 Final url - http://www.theoutletscenter.com/product/7 For that i m using following code in web.config file.. ================================ <configuration> <system.webServer> <rewrite> <rules> <rule name="Rewrite to product.asp"> <match url="^product/([0-9]+)/([_0-9a-z-]+)" /> <action type="Rewrite" url="product.asp?ID={R:1}" /> </rule> </rules> <outboundRules> <preConditions> <preCondition name="HTML Only"> <add input="{HTTP_CONTENT_TYPE}" pattern="^text/html" /> </preCondition> </preConditions> <rule name="rewrite to clean url" preCondition="HTML Only"> <match filterByTags="A" pattern="^/product\.asp\?ID=([0-9]+)$" /> <action type="Rewrite" value="/product/{R:1}" /> </rule> </outboundRules> </rewrite> </system.webServer> </configuration> ============================================= But I m getting error..can anyone suggest me solution for this.. Thanks in advance
You supply more info, such as the particular error message. Try urlrewriting.net - its very easy to include and use in projects.
I've never been happy with url rewriting in IIS. If you don't have too many products you could create a shell page for each, or append the product name to the querystring or go for an seo friendly directory structure. All would probably achieve the same seo benefits as url rewrites.
Hello, Check below url for IIS7 Url Rewriting http://learn.iis.net/page.aspx/461/creating-rewrite-rules-for-the-url-rewrite-module/