I am looking at a website which has a good URL structure and URL routing is based on the breadcrumb. I would appreciate if some can give me an idea about the about
- database design of this site structure
-
How can such URL routing be achieved in ASP.Net webform using c# & URL routing
Example of site url
To me it looks like a nested structure of page which can go upto any depth. May be something similar to PageID, ParentPageID in database design.
Actually, it doesn’t look too hard to implement.
Note that all urls start with “frankfurt/[ID]/”
This ID is the only part that really interests the parser.
Note that if you go to http://www.messefrankfurtme.com/frankfurt/19/messe-frankfurt/for-visitors/about-us/messe-frankfurt.aspx or if you go to
http://www.messefrankfurtme.com/frankfurt/19/asd.aspx
That’s the same page.
What they have is a URL generator, that gets a page and generates a URL according to it’s ID and path.
The url parser is much simpler, and actually only parses the ID, ignoring all other parts of URL.
It’s a good way to approach smart URLs, but It creates duplicate pages which is potentially bad for SEO.
I’d suggest adding a few lines in the URL parser, that would query the URL generator for the correct URL for the given ID, and if it is not the URL requested, redirect the user to the correct one.