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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesHttpModule for permanent redirectionHttpModule for permanent redirection
Previous
 
Next
New Post
7/25/2014 8:34 AM
 

Hallo, I'm migrating to dnn an old classic asp news site with several thousands of articles (around 50/60k) so I don't want to loose the links we gathered in all this time.

What I'm going to do is write an HttpModule that check if the requested url is "myoldsitepath.asp?", read the querystring to extract article ID, lookup to a simple db table with oldid > newurl match and makes a permanent redirect to the new dnn url.

Since I'm a total newbie to DNN I just wanted to know if there is some built-in class to exploit for this task, any suggestion on which event to attach the module and such. I don't want/need to create a dnn package for that, manually registering it in web.config will be ok.

 
New Post
7/25/2014 12:02 PM
 

The DNN Request Filter is a good place to start.  You can find the code in the DotNetNuke.HttpModules project that is included in the DNN Solution.  Specifically look at the DotNetNuke.HttpModules.RequestFilter.RequestFilterModule class which shows a redirect after evaluating request headers.  With the number of URLs you need to handle, you will definitely want to think about performance and do some testing.

You might also look at the IIS URL rewriter or the core DNN URL rewriter, both of which should be able to handle your rewriting needs without having to write your own module.


Joe Brinkman
DNN Corp.
 
New Post
7/25/2014 2:26 PM
 
I'd also have a look at Open UrlRewriter (http://openurlrewriter.codeplex.com/) by MVP fellow Sasha Trauwaen

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/25/2014 2:26 PM
 
I'd also have a look at Open UrlRewriter (http://openurlrewriter.codeplex.com/) by MVP fellow Sasha Trauwaen

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/25/2014 2:27 PM
 

Thank you Joe you are always helpful to me! And thank you Sebastian my saviour ;)

I can't wait to start some module development, I'm really in love with DNN since I discovered it. 
At the moment I was a bit in hurry so I wrote a custom httpmodule without resorting to DNN classes. It's quite simple and if it finds the correct conditions does a db lookup on an integer (clustered primary key) column with article id and retrieves the new url.

It uses ado datareader it should be quite fast... after all losing all the links since 7 years would be a sucide... I just hope Google won't hit much hard on us :)))

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesHttpModule for permanent redirectionHttpModule for permanent redirection


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.

Content Layout

Subscribe to DNN Digest

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out