URL Manager not redirecting

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.
10/4/2010 3:13:14 PM
Gravatar
Total Posts 10

URL Manager not redirecting

I'm working with a new installation and all appears to be working correctly so far, except the URL manager is not resolving friendly URLs.

New pages, including the home page do not resolve using their friendly URLs.  I get a 404.  But, if I enter the full URL with the pageID, they pull up fine.  I've checked the URL Manager under Admin Tools and they are listed there.

Do I need to enable friendly URLs somewhere?

10/5/2010 7:43:08 AM
Gravatar
Total Posts 18439

Re: URL Manager not redirecting

If you moved your site and database from your local machine to a server, it would be very easy to get a lot of 404 errors if the url structure was not the same on the local machine as on the server. You gave no example of the urls that produce a 404.

http://www.mojoportal.com/moving-an-installation-of-mojoportal-to-a-different-server.aspx

Other than that it should work. It works for me and no-one else is reporting any problem with it.

You did not mention what version of mojoPortal, OS/hosting environment.

Hope it helps,

Joe

10/5/2010 7:51:09 AM
Gravatar
Total Posts 10

Re: URL Manager not redirecting

Hi Joe -

I didn't move from one server to another.  Just installed it on this server and started customizing my skin there.

These URLs work:
http://www.questline.com/mojoportal/Default.aspx
http://www.questline.com/mojoportal/Default.aspx?pageid=0
http://www.questline.com/mojoportal/Default.aspx?pageid=2

These don't:
http://www.questline.com/mojoportal/home.aspx
http://www.questline.com/mojoportal/products.aspx

We are running on a dedicated server for many of my sites so I have full control over the environment.  I installed mojoportal using the MS deployment tool.

Environment details:
mojoPortal Version 2.3.5.3 MSSQL
Operating System Microsoft Windows NT 5.2.3790 Service Pack 2
ASP.NET Version v4.0.30319 Running in Full Trust

 

I'm looking at the URL Manager and can see each URL listed there:
http://www.questline.com/mojoportal/home.aspx
maps to http://www.questline.com/mojoportal/Default.aspx?pageid=0
http://www.questline.com/mojoportal/products.aspx
maps to http://www.questline.com/mojoportal/Default.aspx?pageid=2

Can you tell me how the re-writer works exactly or where problems might occur?  I'm just not sure where to troubleshoot at this point.

10/5/2010 8:13:04 AM
Gravatar
Total Posts 18439

Re: URL Manager not redirecting

Hi,

You installed it in a sub folder mojoportal which is a bad idea if you plan to later make this site public, would be far better to make it a root site. It not only hurts your seo but mine if you have the word mojoportal in your urls. You could have deployed it on top of the existing html site in the root or you could create another iis web site dev.yourdomain.com for working on the site then later you could make the real site point to it, but if you create content using the /mojoportal folder then it will be difficult later to change it to a root site.

Also if there is any other .NET app running in the root it can interfere.

If you have any other url re-writing or routing or url scan or really any other isapi modules installed on the server, they could be a factor.

Other than that make sure you have not commented out the module in Web.config

<add name="UrlRewriter" type="mojoPortal.Web.UrlRewriter, mojoPortal.Web"/>

and verify that the friendly url mappings exist in Administration > Advanced Tools > Url Manager, if they do not then of course a 404 will result.

Hope it helps,

Joe

10/5/2010 8:19:43 AM
Gravatar
Total Posts 18439

Re: URL Manager not redirecting

Make sure also that the friendly url listed in url manager matches what is set on the page in page settings.

The url re-writing works by looking up the requested ur in the database (corresponding to what you see in url manager) and then it re-writes the url to /Default.aspx?pageid=x which is the real page serving the request but the browser would still show the friendly url.

My best guess is you have something else like an isapi module running in IIS that is re-writing or otherwise manipulating the url before it gets to mojoportal code.

Hope it helps,

Joe

10/5/2010 7:28:27 PM
Gravatar
Total Posts 10

Re: URL Manager not redirecting

Hi Joe - I've moved the site to the root and it seems to be running correctly there except for the url re-writing.

Do you know how I would identify if there are any ISAPI modules installed that would be causing a conflict?  I had URLScan installed, but have since removed it and do not see a change.  I've checked the ISAPI filters in IIS and the only thing listed there at the top level is ASP.NET_4.0.30319.0.  Nothing is listed for the individual site.  I've checked my web.config and the module is not commented out.  All the URL mappings appear in the URL manager and match those set on the page properties.

Is there any other suggestion you can give me on where to look or how I might identify what is keeping the url from getting to the mojoportal code?
 

10/6/2010 6:47:52 AM
Gravatar
Total Posts 18439

Re: URL Manager not redirecting

Something is making IIS handle those requests before it gets to .NET code so it is seeing that file doe snot exist and returning a 404 from IIS without ever giving .NET a chance to handle the request.

By default all requests for .aspx files should be handled by .NET and therefore not result in a 404. In fact if the friendly url did not exist but .NET was handling the request, you would not see the default IIS 404 page but would see our custom 404 page, like on this site if you request a non existing .aspx page that is not a friendly url mapping like http://www.mojoportal.com/foo.aspx , it will show our friendly 404 page because the request is still handled by .NET and this allows us to use our custom 404 page. On your server it seems that some check is being made for if the file exists and only letting .NET handle the request if the file does exist.

So, something is either very mis-configured or you have some module of some kind interfering.

Are you using an "Integrated" application pool or a "Classic" one? It should work in either case but I would recommend use Integrated.

Wish I could be more help, but that is all I have for you at this point.

Best,

Joe

10/6/2010 7:29:53 AM
Gravatar
Total Posts 10

Re: URL Manager not redirecting

Hi Joe -

I found the problem.  Should have realized it sooner, but your last post made me realize exactly what it was.  Thought I'd let you know the cause in case someone else runs across this.  By default, sites on my server are setup with the "Verify that file exists" checkbox checked in the configuration options for the .aspx ISAPI extension.  This allows IIS to handle 404s instead of passing them to the application if you aren't using custom error handling.

All I had to do was uncheck the box to pass 404s through to the app and voila!  Thanks again for your help!

John

10/7/2010 9:41:57 AM
Gravatar
Total Posts 18439

Re: URL Manager not redirecting

Hi John,

Glad you got it working!

I guess you are using  Win 2003/IIS 6 since your 404 page looked like the standard IIS6 404 page. I don't currently have any win 2003 boxes around and don't remember seeing that setting before. Wonder if you could email me a little screen shot showing where that setting is so I could add it to the documentation? It can help prevent this issue if anyone else has this setting enabled.

Thanks,

Joe

joe dot audette at g mail dot com

10/7/2010 10:15:40 AM
Gravatar
Total Posts 10

Re: URL Manager not redirecting

Absolutely!  I just sent over a few screenshots via email.  Let me know if you don't receive them.

John

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