'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

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/3/2010 3:30:30 PM
Gravatar
Total Posts 10

'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

Hi all,

if I set 'Default Friendly Url Pattern'  to 'page-name' (and not 'page-name.aspx') I get nevertheless aspx extensions on some of the mojo portal system links like 'Site Map', 'My Account' and some others.

Anybody out there who knows how to change settings to get ALL links without aspx extensions? It's very important to me not to show what system I (and my customers) use.

Thanks
Martin

10/3/2010 3:35:39 PM
Gravatar
Total Posts 18439

Re: 'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

Hi Martin,

It does not change existing urls. It only changes how new urls will be suggested.

Best,

Joe

10/3/2010 4:21:04 PM
Gravatar
Total Posts 10

Re: 'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

Hi Joe,

ok, thanks, that's something I understand. But where do I change the url mapping for these predefined entries (Site Map, MemberList, Search ...)?

I just created a url mapping for http://xxx/Sitemap to SiteMap.aspx so if I use http://xxx/Sitemap I get the correct Sitemap. But how do I change this in that way that <portal:SiteMapLink returns the link without aspx? Of course I can hard code this in the layout.Master file but there must be a more genius/general solution I think (include a solution for all the other system pregenerated links from <portal:xxx).

Thanks,
Martin

 

10/4/2010 9:29:05 AM
Gravatar
Total Posts 2253

Re: 'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

Hi Martin,

You wrote "It's very important to me not to show what system I (and my customers) use."

May I ask if you are referring to the .NET framework or mojoPortal?

In either case, I haven't found that there is much value in the use of extensionless URLs for the purpose of securing one's website. It is quite easy for any "hacker" (or 10 year old) to determine a website's framework without looking at the url extensions.

Thanks,
Joe D.

10/4/2010 12:19:06 PM
Gravatar
Total Posts 10

Re: 'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

Hi Joe D.,

thanks for your answer. Security is only one aspect but some customer doesn't like the aspx extension and if I like to use mojo portal to do a web site for them I have to omit these extensions. For my own links/menus this is no problem and, as I wrote, I can code this manually in the layout master file but there must be an easier solution. And even if I code this manually I'm not sure to eliminate all instances of them.

Due to a configuration error I e.g. got the following error message from mojo:

'We're sorry but a server error has occurred while trying to process your request.

The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page.'

The link home page refers to: http://mywebsite/Default.aspx. And that's it why I'm looking for a more general solution.

So in this term I speak about ASP .NET and the .NET framework.

Regards,
Martin

10/4/2010 12:44:24 PM
Gravatar
Total Posts 18439

Re: 'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

The pages in the main menu are CMS pages and they use url re-writing to make friendly urls like /home.aspx or just /home if using extensionless urls. These friendly urls are all re-written to /Default.aspx?pageid=x (which is the real page that serves the request) but the user only sees the friendly url in the browser.

However since Default.aspx is the real page that serves content for all theses friendly urls you cannot change it.

For other physical .aspx files you "might" be able to create friendly urls that map to them in the Administration > Advanced Tools > Url Manager.

For example you could try making a friendly url ~/sitemap that uses the real url /SiteMap.aspx

However the built in links are not going to know about those friendly urls so they are still going to render the real url. So it would be impractical because you would have to create your own links that use the friendly urls you define. to replace the links for sitemap and other things to try and hide the .aspx extensions.

So, the bottom line is, if you have a customer that insists no urls can use the .aspx extension then mojoPortal is probably not the solution for that customer.

If you were hand crafting html pages instead of using a CMS they would have a .html extension, so it is not much different to have a .aspx extension.

Maybe at some point in the future I will try to use ASP.NET routing to alllow extensionless urls on these physical pages, but, there are still people using IIS 6 which cannot use extensionless urls without third party isapi modules. IIS 7 is still relatively new, and the possibility for extensionless urls only became possible easily in IIS 7.

For now, you can only use extensionless urls for CMS pages easily.

Best,

Joe

3/28/2011 2:28:42 AM
Gravatar
Total Posts 6

Re: 'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

Hey Joe, 

are there any news regarding asp.net routing?

I'm thinking of converting one site to mojoPortal, but it uses asp.net routing, so I'm not sure how to do it without loosing all the page links (which would also break Google index).

Regards, 

Mario

3/29/2011 2:43:33 PM
Gravatar
Total Posts 18439

Re: 'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

Hi Mario,

If you are working with the latest source code, we do have some plumbing implemented for routing that allows you to define routes via configuration files. It is not yet used in mojoPortal but is work for some future things. If you look at the code in Web/Components/Routing and at the config file under /Setup/Routes you can get the idea and try it yourself and see if it can work for your needs.

Best,

Joe

5/18/2011 3:56:59 AM
Gravatar
Total Posts 6

Re: 'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

Hi!

Back to routing :). 

Ok, got the source code, but I'm not sure how can I use this if it is not used by mojo itself. 
For instance, I want to create Restaurant.aspx which will pick up all urls like mysite/restaurant/{qid}.
I did add route to Setup\Routes, but nothing happens. 

Am I supposed to plug in some code while loading site to make this work? 

Regards, 

Mario

5/18/2011 5:59:55 AM
Gravatar
Total Posts 18439

Re: 'Default Friendly Url Pattern' has no effect on 'Site Map' and other links

To use routing you would have to do custom development and configure a route to a custom page.

CMS pages (ie the pages in the site menu) in mojoPortal do not use routing they use url re-writing. In fact nothing currently built into mojoPortal uses routing, we have the routing sub system only for use in custom development and possibly some future use in mojoPortal features.

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