Redirect domain names using UrlRewrite.NET

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, but it can also be found at, or but ideally these should just redirect to the primary address. Using a host condition in UrlRewriter.NET makes this easy:

<if header="HOST" match="^((|(|($">
<redirect name="RikDVR" url="^(.*)$" to="$1" />

Comments (3) -

10/10/2008 2:19:50 AM #


Thanks for the tip. You saved me a lot of time.


10/13/2008 6:19:16 PM #

Abraham Luna

This code isn't working. I enter and get redirected to

Abraham Luna

7/11/2009 12:28:11 AM #

Det er også fordi det skal gøres således Smile

<add name="DomainRedirect"

Scott Hugh Alexandar Petersen

Comments are closed

About Us

RikWare is a software development company based in Brisbane, Australia. Led by director, Richard Mason, RikWare focusses on solving challenging business problems promptly and effectively.

RikWare is also the owner of Aussie Bushwalking, a free, wiki-like collaboration site for bushwalkers and the creator of RikMigrations, a migration framework for .NET.

Aussie Bushwalking

Want to discover some new bushwalking ideas? Share a few of your own? Aussie Bushwalking is like Wikipedia... but for bushwalkers. Head on over. Anybody can see the walks and it's free to sign up and share your own.



RikMigrations is a database migration library for .NET based on the migrations facility provided by Ruby on Rails. It allows simple upgrading and downgrading of databases using .NET code (such as VB or C#) either from the command line or built into your application. Unlike many other migration frameworks, RikMigrations is a stand-alone library which does not rely on a large surrounding framework.