Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Helicon ISAPI_Rewrite Redirect Fails with DotNetNuke 6 and IIS 7.5Helicon ISAPI_Rewrite Redirect Fails with DotNetNuke 6 and IIS 7.5
Previous
 
Next
New Post
8/8/2012 3:11 PM
 
I am preparing to launch a new website for a large hospital health care system.  URLs from the old site need to be redirected to the new site.  I am attempting to use ISAPI_Rewrite 3.0 to do this, but it is not working as expected.

Both the old and new sites are in DotNetNuke 6.1.5 on Windows Server 2003 and are hosted on the same Windows Server 2008 with IIS 7.5 with IIS 6.0.  The old site has been upgrade from DNN 4.x to 5.x and then to 6.x.  The new site is a fresh install of 6.x with minor updates to the newest versions.

I have used ISAPI_Rewrite 3 in the past on a DotNetNuke site hosted on Windows Server 2003 with IIS 6.0 and it works fine.  I am wondering if the problem is specific to IIS 7.5.

I will make up names for the two sites, but the address to the right of the host/domain is what I am actually using in the httpd.conf.

The old site is: www.myhospital.com
The new site is: dev.myhospital.com

I also added an IIS host header and a DNS A record for old.myhospital.com on the www site for testing.  I need to keep the old site online while I develop the RewriteRule entries in the httpd.conf.  At launch, I will use 301 redirects, but I am using 302's for testing.

www.myhospital.com and old.myhospital.com point to the old live site.

dev.myhospital.com points to the new site.

For debugging the problem I am having, I also created a new host on another domain on a new website hosted on the same web server as the above two sites.  It contains one file, default.aspx with the content "It works!"

Here is the httpd.conf file:

---

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.89

# Registration info
RegistrationName= xxxxxxxxxx
RegistrationCode= xxxxx-xxxxx-xxxxx-xxxxx

RewriteEngine off
AllowOverride none

<VirtualHost old.myhospital.com>
RewriteEngine on
AllowOverride all

RewriteRule ^/Test1/Default.aspx http://www.google.com [R=302,NC,L]
RewriteRule ^/HealthCareServices/DiabetesandNutritionTherapyCenter/NutritionTherapy/tabid/463/Default.aspx http://dev.myhospital.com/HealthCarebrServices/HealthServices/DiabetesNutritionTherapy/NutritionTherapy.aspx [R=302,NC,L]
</VirtualHost>

<VirtualHost test.anothersite.com>
RewriteEngine on
AllowOverride all

RewriteRule ^/Test2/Default.aspx http://www.google.com [R=302,NC,L]
RewriteRule ^/HealthCareServices/DiabetesandNutritionTherapyCenter/NutritionTherapy/tabid/463/Default.aspx http://dev.myhospital.com/HealthCarebrServices/HealthServices/DiabetesNutritionTherapy/NutritionTherapy.aspx [R=302,NC,L]
</VirtualHost>

---

If I browse to:

http://old.myhospital.com/HealthCareServices/DiabetesandNutritionTherapyCenter/NutritionTherapy/tabid/463/Default.aspx

it should redirect to:

http://dev.myhospital.com/HealthCarebrServices/HealthServices/DiabetesNutritionTherapy/NutritionTherapy.aspx

However, it actually redirects to:

http://www.myhospital.com/Default.aspx?TabId=463

I don't understand how the rule to redirect to the dev site results in a redirect to the www site.  Digging deeper, I find if I completely remove the VirtualHost sections with RewriteRule lines from the httpd.conf, I get the same result.  It appears the rule is being ignored completely and somehow the URL is being mangled somewhere else.

If I browse to:

http://old.thompsonhealth.com/Test1/Default.aspx

Instead of being redirected to:

http://www.google.com

it redirects to:

http://dev.thompsonhealth.com/Test1/Default.aspx,http://www.google.com


Notice there is a wrong dev URL, followed by a comma, and then the URL for Google.

If I remove the VirtualHosts and RewriteRule lines from httpd.conf, it redirects to:

http://dev.thompsonhealth.com/Test1/Default.aspx

This also is wrong, but different.


From here, I moved on to testing on www.anothersite.com (not the actual URL).  It works!  

If I browse to:

http://www.anothersite.com/HealthCareServices/DiabetesandNutritionTherapyCenter/NutritionTherapy/tabid/463/Default.aspx

it redirects to:

http://dev.myhospital.com/HealthCarebrServices/HealthServices/DiabetesNutritionTherapy/NutritionTherapy.aspx

This is the correct redirection.


Also, if I browse to:

http://www.anothersite.com/Test2/Default.aspx

It redirects to:

http://www.google.com

This also is correct.


Why does this work fine for the non-DotNetNuke site, but fail for the DotNetNuke site?  How do I fix this?

Any help would be greatly appreciated!

Thanks,
-Pat

 
New Post
8/11/2012 3:41 AM
 
Patrick
Whilst not a way to get ISAPI_rewrite working. Have a look at either the IIS rewrite module http://www.iis.net/download/urlrewrite or for something more specific to DotNetNuke the iFinity URL master module http://www.ifinity.com.au/Products/Url_Master_DotNetNuke_Url_Rewriting/Features_Options.

The first is pretty similar to ISAPI_rewrite and is free. Downside is that it's doesn't link into the DNN database. The URL master module on the other hand integrates into DNN very well.

HTH
Antony
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Helicon ISAPI_Rewrite Redirect Fails with DotNetNuke 6 and IIS 7.5Helicon ISAPI_Rewrite Redirect Fails with DotNetNuke 6 and IIS 7.5


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out