Latest version interfering with some redirects?

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
1/24/2012 5:49:25 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Latest version interfering with some redirects?

We've been keeping a set of IIS 301 redirects for the directory trees of our old sites. With the latest mojoPortal upgrade, these are no longer working and are instead throwing 404 errors.

As an example, our old library site used to be at www.escondido.org/library/index.htm, so we put a redirect to library.escondido.org on the /library folder under the mojoPortal installation. Previously, requests for www.escondido.org/library were redirecting correctly. Now a 404 happens instead of the redirect. If I specify the full path of www.escondido.org/library/index.htm the redirect works.

I looked at the prior version of web.config side-by-side with the new one to see if I could pinpoint what might have caused this change in behavior. These are the things I restored, but they didn't have any effect:

Changed <modules> to <modules runAllManagedModulesForAllRequests="true">

Changed <add name="PageNotFoundHandler" type="mojoPortal.Web.PageNotFoundHttpModule, mojoPortal.Web" preCondition=""/> to <add name="PageNotFoundHandler" type="mojoPortal.Web.PageNotFoundHttpModule, mojoPortal.Web" preCondition="managedHandler"/>

Any help would be greatly appreciated.

Thanks,
Jamie

1/24/2012 6:05:17 PM
Gravatar
Total Posts 18439

Re: Latest version interfering with some redirects?

Hi Jamie,

My apologies, I'm not sure what version I made this change but I forgot to make a note to myself to mention it in the release announcement and I only recently updated the documentation after someone else pointed it out, but you need to  add this to user.config:

<add key="UseUrlReWritingForStaticFiles" value="true" />

Hope that helps,

Joe

1/24/2012 6:18:46 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Latest version interfering with some redirects?

Hey Joe, unfortunately that doesn't seem to be doing the trick. I'm not using the 301 redirect manager for these, they're actually specified at the IIS level (a web.config file containing just the redirect is located on disk within each physical folder that's to be redirected). Now that I think about it, is mojoPortal now getting and handling the request before IIS can process that other web.config file?

I guess in a pinch I could go back and recreate some of the most important redirects in the 301 redirect manager if I have to. Since we've been up on mojoPortal for over a year I would hope that people would have updated their bookmarks. Of course it took less than 24 hours for someone to complain about this issue, so maybe that's a pipe dream. Tongue Out

Jamie

1/24/2012 6:30:25 PM
Gravatar
Total Posts 18439

Re: Latest version interfering with some redirects?

Hi Jamie,

Its most likely this change:

Changed <modules> to <modules runAllManagedModulesForAllRequests="true">

back that out and see what happens, I've already backed it out in the repository recently. Then also remove the:

<add key="UseUrlReWritingForStaticFiles" value="true" />

to make sure mojoPortal doesn't redirect them before your iis redirect settings.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.