Blog Read me

Setting up IIRF to redirect to www

So I have been doing some testing on my website and needed to redirect requests to to Lucky for me the site is using IIRF to manage my urls from the old community server days to my DotNetNuke conversion.

Using IIRF I'm able to create a simple rule that will handle the redirects for me, I've pasted it below.

# force proper www. prefix on all requests
RewriteCond %{HTTP_HOST} ^chrishammond\.com [I]
RewriteRule ^/(.*)$1 [I,RP]

Recent Comments

[RP] - ? it's not in the official documentation Where did you get it from ?

Posted By: Furmek F on Thursday, March 6, 2008 8:01 AM
RP doesn't have any meaning to IIRF. I think it means "redirect permanently" on Helicon's ISAPI rewrite. If you want that in IIRF, just use [R] or combine it with [I] like [I,R].
Posted By: Cheeso C on Saturday, June 14, 2008 9:07 PM
Hi Chris, I've tried your suggestions above but no joy (I added the changes from the comment above this but still couldn't get it to work) Not sure quite what I'm doing wrong... any ideas? Thanks Simon RewriteCond %{HTTP_HOST} ^mydomain\ [I] RewriteRule ^/(.*)$1 [I,R]
Posted By: Simon Nicol on Wednesday, October 21, 2009 10:17 PM
I'm not actually using IIRF anymore, I use the URLMaster module for DotNetNuke, available from
Posted By: Chris Hammond on Wednesday, October 21, 2009 11:40 PM
I just figured it out. The rule used is a RewriteRule. To redirect, use RedirectRule instead. RedirectRule ^/(.*) http://www.domaincom/$1 [R=301]
Posted By: Sujay R on Monday, November 9, 2009 5:34 PM

Add Comment

Please add your comment by filling out the field(s) below. Your comment may need to be approved before it becomes visible.
Enter your first name for display with the comment
Enter your last name for display with the comment.
Enter your email address so that we may contact you if necessary. We will also use this for your Gravatar.
Enter the URL to your website. URLs may be removed from comments.
Enter your comment here.
If you can't type Human in, you can't post, plain and simple.
Submit Comment Cancel

Chris Hammond is a father, husband, leader, developer and car guy. Chris has long specialized in ASP.NET and DotNetNuke development, so you will find a variety of topics here on the website. For more information check out the about me page.

If you are looking for DotNetNuke consulting please visit my business website at