Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

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 ...Help me handle URLS from another applicationHelp me handle URLS from another application
Previous
 
Next
New Post
1/10/2008 1:32 PM
 

Luckily in this case I don't have to worry about other portals, I don't foresee adding new portals to my peronal domain anytime soon, I have enough other URLS to use for those :)

 


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
1/10/2008 2:25 PM
 

In that case, I definitely recommend a filter over messing with friendly URLs.

The filters are free (to a point), efficient but with full fledge Reg Ex and iterative rules.  They are stable and won't be an issue during DNN upgrades.  I run one site with over 70 rules which I thought would be a performance hit.   I used the good URL rules (above) and the rest are still a fraction of what it takes DNN to run.  The only real issues I have had was with mutli-portals using the same tab paths.  The fix was just a matter of being explicit. 

As to Google PR, if you have a page with +hundred back links, don't move it.  Even a 301 redirect saw a hit in terms of PR and traffic.  Instead, make a copy with enough differences to not be a dup and maintain the page for as long as you own the site.  This assumes you make some kind of money off the page so the effort is worth it.  I recommend duplicating your feeds as well.  I don't trust all readers will update to the new location.

Given a few catchall redirects, all the rest of the blog pages will move in about three weeks without issue.

 
New Post
1/10/2008 2:39 PM
 

Hi Chris,

Like Gilles, I've used IIRF and found it to be really helpful.  With IIRF you don't have to worry about writing pass through filters, you just write the one filter you need.

The one drawback to using an ISAPI filter is that this really works best when there is some kind of pattern that you can match between the two environments.  This would be the case if the IDs for the posts were the same after the migration, but if it isn't the case, then you really need something that will allow you to dynamically find the new URL.

In your case, it looks like you will need to perform a variety of lookups based on the different formats of your URLs.  I would suggest creating a redirect page such as redirect.aspx which contains the code you will use to perform a 301 redirect.  You could modify the code below to add your custom lookup.

<%@ Page Language="C#" AutoEventWireup="true" %>
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
      Response.Status = "301 Moved Permanently";
      string redirectURL = string.Empty;
      // Custom code to lookup old location and find URL of new location
      // goes here. For this demo, it's hard coded.
      redirectURL = "http://dellwh/dnn040002/Blog/tabid/54/Default.aspx";
      Response.AddHeader("Location",redirectURL);
}

</script>

Then, all you need to do is redirect requests using IIRF for anything that starts with /blogs/archive/ to your new redirect.aspx page.  In the IIRF ini file, you would add an entry like the following:

RewriteRule ^/(blogs/archive/.*) /redirect.aspx?requestedUrl=$1

You'll need the requestedUrl querystring parameter in the redirect.aspx page so you can parse it and lookup the URL of the new page.

Another Possibility

Another possibility, although I haven't tested this approach personally is to create a custom 404 page which essentially does the same thing as the code listed above.  The advantage to this approach is that you can do this without having to install an ISAPI filter, which you probably can't do in a hosted environment.  The disadvantage is that it's not as clean from an SEO perspective since you get two bounces instead of just 1 (a 302 followed by a 301).  There may be a workaround for this, but I haven't gone done that road since I just use the IIRF ISAPI filter.  For anyone interested in the 404 approach, here's the change you would need to make to your web config file to assign your custom 404 page:

<customErrorsmode="On">


<errorstatusCode="404"redirect="404.aspx"/>
</customErrors>


Don Worthley
Software Architect
Element Eleven

 
New Post
1/10/2008 3:00 PM
 

Oops.  I was trying to make a change to the formatting of the web.config code and the page submitted on me.  I'm actually glad it submitted.  I thought I had lost the post.

Anyway, I was going to say that if you go the custom 404 route, you will want to make sure you still leave a way to return 404 errors for pages that don't fit your pattern.  You would need to make sure that the Response.Status was set appropriately (404 Not Found).

One last thing to note if you use the first approach, a generic 301 redirect for one entire directory to another can be used when the files are all the same (you've just moved a directory to a new location).  When you are moving from one environment to another, like from CommunityServer to DNN (Kudos to Chris on the move, by the way), you'll need to write a little custom code to parse out the old URL and redirect to the new.

HTH,

Don Worthley
IT Crossing



Don Worthley
Software Architect
Element Eleven

 
New Post
1/10/2008 4:59 PM
 

Thanks for the input everyone. I'm still open to ideas, but thinking that Dan's approach might be best/fastest/easiest at this point in time.


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Help me handle URLS from another applicationHelp me handle URLS from another application


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