by admin
30. October 2007 11:43
UrlRewriter.NET is a great tool for url rewriting in .NET. It can even be used to redirect domain names with.
e.g. RikPVR's main address is http://www.rikpvr.com/, but it can also be found at http://www.rikdvr.com/,http://rikdvr.com/ or http://rikpvr.com/ but ideally these should just redirect to the primary address. Using a host condition in UrlRewriter.NET makes this easy:
<if header="HOST" match="^((www.rikdvr.com)|(rikdvr.com)|(rikpvr.com))$">
<redirect name="RikDVR" url="^(.*)$" to="http://www.rikpvr.com$1" />
</if>
56cd362a-1738-46d3-9d58-38c0bbd5e22e|0|.0