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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsBlogBlogBlog 4.0.0, load balancer, and infinite redirects: workaround and suggested fixBlog 4.0.0, load balancer, and infinite redirects: workaround and suggested fix
Previous
 
Next
New Post
5/17/2010 3:42 PM
 
I spent a couple of days struggling with a bug in the Blog module (4.0.0) where clicking the "read more" link in the list of recent posting would lead to an infinite redirect loop.  I was able to work around it by turning off  "Show SEO friendly URL" in the module options.

The trigger of the problem is my institution's F5 Big-IP load balancer, behind which my web server must live.  It's configured so that an incoming web request will go first to the load balancer, which will rewrite the port with a high number, and then send the request on to the web server.  For example, it will rewrite http://example.com/default.aspx to http://example.com:12345/default.aspx.  The web server is configured to listen on the high-numbered port, instead of port 80.  The web server hosts multiple sites, each listening on a distinct high-numbered port.  They do this for failover, and easy migration of sites between servers.  This configuration is not too unusual, though we've been bitten by it a few times over the years when we forget this is going on.

The problem in the blog module is in ViewEntry.ascx.vb, starting at line 133.  The code verifies that the request URL matches the URL returned by BlogNavigateURL, and if not, sends a 301 redirect including an X-Blog-Redirect-reason header.  In my case, the URL as seen by the web server includes the high-numbered port.  The BlogNavigateURL function will return the URL without the port number, which is correct.  The code needs to make the URL comparison insensitive to the port number of the actual request.  There's a setting in the <appSettings> within web.config, UsePortNumber, that seems relevant here.  Maybe the logic should be to look at that setting, and if false, make a port-number-insentitive URL comparison.  (Though I think a port-number-insensitive comparison would be fine even when that setting is true.) I think that change would fix my problem, and let all of us behind load balancers enjoy SEO friendly URLs.

Thanks very much!
 
New Post
5/18/2010 9:05 AM
 
Carl,

Your observation here is mostly correct, but could cause problems for people that are actually running on a different port number to the general public.

The "UsePortNumber" setting though could be the real ticket here, I would enter this as a bug for the module so the development team can review.

-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsBlogBlogBlog 4.0.0, load balancer, and infinite redirects: workaround and suggested fixBlog 4.0.0, load balancer, and infinite redirects: workaround and suggested fix


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