Archive
Monthly
Go
|
|
DNN Blog
Nov
11
Posted by:
Chris Hammond
11/11/2007 5:30 PM
The new HumanFriendly URL provider was finally implemented into DNN 4.7.0. To utilize it though you'll need to modify your web.config file
Previous Value
name="DNNFriendlyUrl"
type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules"
includePageName="true"
regexMatch="[^a-zA-Z0-9 _-]" />
With HumanFriendly urls turned on it'll look like the following
name="DNNFriendlyUrl"
type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules"
includePageName="true"
regexMatch="[^a-zA-Z0-9 _-]"
urlFormat="HumanFriendly"
/>
I'm still doing some testing and research. The documentation on this new provider is still lacking, I'll see if we can get more info put together, especially for use by module developers!
Edit 1/2:
From my understanding and testing this is an example of the way the HumanFriendly URLS work
SearchFriend (Default)
http://localhost/dotnetnuke_2/home/Tabid/36/default.aspx
HumanFriendly (if you turn this as I instruct above)
http://localhost/dotnetnuke_2/home.aspx (extra HTTP:// removed for the picky out there :) )
40 comment(s) so far...
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Hi, Bruce Chapman made some major changes to the URL re-writer which were given to Scott McCulloch. He mentioned that thay would e incorporated into the provider. Was wondering if they made it in to 4.7 See excerpts below... Also have a look at the working site, the url's are very friendly...
A notice to people following this thread - I have posted my latest build of the Friendly Url provider.
Here's a list of all the things that this version can do:
Url's are generated as friendly Urls by all code which uses the standard NavigateUrl() call in DotNetNuke. Choice of page extension - .aspx or any other extension (such as .page) Choice of using page extensions - options are "always", "never", "pageOnly". Always and never are self-explanatory, pageonly means only use an extension when the Url is for a page that contains no query parameters. 301 redirects for 'unfriendly' page requests. This can be on or off. 301 redirects to home page for deleted and expired pages A regex filter can be implemented to restrict 301 redirects for matching Urls Individual pages can be restricted from 301 redirects by placing in a delimited list Choice of two ways of handling parameters/query strings - ordered, in which the values are shown as consecutive levels in a path (key1/value1/key2/value2) and "firstparmlast" in which the first key value is placed last (value1/key2/value2/key2). Choice of detecting duplicate portal alias/page path combinations. It is possible to have portal1/test as a page, and a portal which has portal1/test as an alias, thus duplicating the same path on a single DNN install. More information and the download files are on my blog at :
http://www.ifinity.com.au/Blog/TechnicalBlog/tabid/60/EntryID/24/Default.aspx
To see it working, have a look at http://www.auctionlink.com.au/TagList/Tag/Valuers/
(I haven't installed it on ifinity.com.au because it runs on shared hosting)
Please note that it is still under development, and further work will be done to include Scott's changes with mine to hopefully produce a stronger better faster version. However, if anyone wants to try this one out let me know how they get on.
By ActiveInternet on
11/12/2007 9:45 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Please give before/after examples of what this provider does. Thank you, Tom
By tlyczko on
11/11/2007 11:51 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
How would the New URL look like ?
By IndianGuru on
11/11/2007 11:51 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
"Old" URL (SearchFriendly - default): http://localhost/dotnetnuke_2/home/Tabid/36/default.aspx
"New" URL (HumanFriendly): http://http://localhost/dotnetnuke_2/home.aspx
By tkraak on
11/11/2007 4:47 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
If you have a page name like Contact Us url will become http://localhost/dotnetnuke_2/ContactUs.aspx
Can you implement hypens and lowercase chars so that url becomes: http://localhost/dotnetnuke_2/contact-us.aspx
Regards.
By greenflash on
11/11/2007 4:47 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
This is an invalid URL!! :) :) http://http://localhost/dotnetnuke_2/home.aspx Thank you, Tom
By tlyczko on
11/11/2007 4:47 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Tlyczko if that's an invalid URL for you there are other issues going on.
By christoc on
11/11/2007 4:48 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
looks invalid to me
By robax on
11/11/2007 9:06 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Heh, nevermind :) I didn't noticed the double HTTP :D
By christoc on
11/11/2007 5:29 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Is this turned on by default?
By BfA on
11/11/2007 9:06 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
No, by default SearchFriendly is turned on.
By christoc on
11/11/2007 9:07 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Is there anyway to combine the two? I meant to sacrifice search ability for readability is not exactly the best of choices. Is there going to be a new way that utilizes both approaches in new versions?
By BfA on
11/11/2007 9:35 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
I'm not positive that turning on the HumanFriendly URLs will have a negative effect on the search friendly URLs. From My testing it appears to still default to the SearchFriendly when you're passing in querystring parameters.
By christoc on
11/11/2007 9:36 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
It'd be nice if we can use htm as the extension for the human friendly url's, as it is friendlier than aspx. What are the steps to configure IIS to do this?
By Isomies on
11/12/2007 9:43 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Would just like to congratulate everyone involved in implementing humanfriendly url's. A great feature that add's loads to DNN's usability
By michealobrien on
11/12/2007 9:43 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Thank you for clarifying the link. For small sites the search etc. should not be an issue. For big sites there's alternative ways to implement site search HTH Tom
By tlyczko on
11/12/2007 9:43 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
How does this change affect Google and other search engines relative to SEO etc.?? Thank you, Tom
By tlyczko on
11/12/2007 9:44 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Tom, this will affect google in a couple of ways. 1 old links that are already indexed will still work, the old format still works fine. Google/spiders should also pickup the new links and I believe will index them more accurately now as the URLs will be shorter, though it'll take some time to see the long run results.
By christoc on
11/12/2007 9:45 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Comment: The Register and Login links get rendered with various ReturnURLs. Perhaps something additional is required to make these particular links look "friendly"?? Examples: http://localhost/Register.aspx?ReturnUrl=%2fDefault.aspx http://dnntest1/Register.aspx?ReturnUrl=%2fHome.aspx http://dnntest1/Login.aspx?ReturnUrl=%2fRegister.aspx%3fReturnUrl%3d%252fHome.aspx This appears not to work for my host account, I still get non-friendly URLs logged in as host account, this is probably not a big deal but people should know about this. My admin account gets some friendly URLs after logging in, account page is not friendly-URLed. Documentation needs to explain what is and is not affected by this change. I know it's difficult to friendly-URL ALL site pages, though. Thank you, Tom
By tlyczko on
11/12/2007 10:26 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
My initial/first experience with site search is that it appears not to work now?? I have only just started, so I tried 'privacy' and 'terms' and no results appeared. Comments/suggestions?? Thank you for responding about google. All my comments before were regarding testing on localhost, not a live server. Thank you, Tom
By tlyczko on
11/12/2007 10:26 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Guys, Check out these links http://www.auctionlink.com.au/TagList/Tag/Valuers http://www.ifinity.com.au/Blog/TechnicalBlog/tabid/60/EntryID/24/Default.aspx
look at the urls in the first example. This code is open source and was provided to Scott. Still trying to get an answer.
By ActiveInternet on
11/12/2007 1:50 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
This is awesome. To make it even better thought, it would be nice if we didnt have to mess with the web.config and could set this directly from the Site Settings page for each portal.
By mathisjay on
11/12/2007 4:44 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
nice BUT many people are not using dedicated/personal servers, they don't have leeway to just throw in and install new things etc., which is the case with the ifinity plugin, not all shared hosting providers will allow customers to change their servers, etc., for this plugin to work it has to not require changing shared hosting providers' servers, which are busy doing other things besides DNN. Is search also broken on the ifinity site as well?? Hopefully there will be good/better progress on this topic, some DNN things move slower than molasses, some things move rather quickly. Thank you, Tom
By tlyczko on
11/12/2007 4:44 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Hi all
Firstly I'd like to clear up the notion that you can't run my version on shared hosting - that is not true at all. To install it all you need is the ability to drop the new dll into the \bin directory and make some web.config changes.
It's true that I did a lot of rework on the version of the Url Friendly provider and gave those changes to Scott McCulloch. By the looks of it Scott's version has become the core version in DNN 4.7, which is great. I'm sure Scott is a busy guy and will get around to incorporating some of my code if that's the right thing to do. He set up a shared space in CodePlex but we haven't got much further than that. He and I did discuss the possibility of some of the code being incorporated into the core, but there are a lot of requirements to meet, to ensure that the code works well on all DNN installations.
To clarify, these are the features my version has: - removal of the tabid/nn from all urls - option to issue a 301 redirect for all 'old' versions of the urls - this is important for any pages with significant Google pagerank - if you change the url you can lose the ranking for that page. A 301 redirect tells Google to update the search index with the new Url, and assign the pagerank to the new url. - option to 301 redirect to home page all expired and deleted DNN pages. This helps if someone has linked to a page you have deleted or expired in your DNN install. - parameter based query strings - there is a choice of two ways to do it. This can be either /key1/value1/key2/value2/pagename.aspx OR pagename/value1/key2/value2/key1.aspx
My version of the friendly URL provider also allows you to completely remove the .aspx extension IF you have access to the IIS settings on the web server. This allows tidy URL's like the mentioned www.auctionlink.com.au/TagList/Tag/Auctions. By removing the default.aspx from the URL, it allowed me to implement the rel='tag' microformat to the correct standards. Note that while this option is there, if you are running your DNN install on shared hosting you can still get all the other benefits, just not the ability to remove the .aspx extension.
This has also been implemented at zymmetrical.com - allowing a much nicer URL such as http://www.zymmetrical.com/art/graphics/.
You can see my blog posting and download the code at www.ifinity.com.au - it's completely free and open source but I would ask if anyone finds bugs/makes improvements they let me know.
I'm quite happy for any/all of this to be incorporated into the DotNetNuke core, but I feel that a few more sites would have to experiment with it, as it really is a major departure from the way the current code works. My version uses a dictionary based lookup with very little regex filtering.
Oh, and BTW the iFinity site doesn't run the friendly provider. I'm intending to shift hosts and I'll implement the provider when I do that. If the search on the site is broken that is my fault - I sometimes use the site as a bit of a beta test for bits and pieces of code, so the reliability isn't as high as for paying customers!
-Bruce
By brucerchapman on
11/13/2007 3:15 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
@christoc
Just to clarify on my experience with Google - if you change the URL on a site and drop the old Url, Google will continue to hit the old Url with the Googlebot. Because the 'old' way of using the Urls still works with the provider, Google won't index the 'new' Url until someone starts posting external links to it. Then you have the problem of two pages with the same content but two separate Url's, so at the very least your pagerank will be split across two Urls. This is why I rewrote the provider to issue a 301 redirect when a 'better' url is available - gradually the googlebot will learn of the new url and shift the pagerank over to the new page, and drop the old page from the index. This still takes a little while, but I've seen results as fast as a couple of weeks for the Auctionlink site (which is the site I developed the provider for).
It also helps if you have a google sitemap for your site, because you can issue all the 'new' urls for the Googlebot to read.
-Bruce
By brucerchapman on
11/13/2007 3:15 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
This Human Friendly appears to break DNN search. DNN search would not work for me after I installed it into the web.config. I removed the Human Friendly from the web.config, did an iisreset, then rebooted the server. Search on the site still does not work when testing it on terms 'privacy' and 'terms', since I don't have any other content on the site. Have other people had search break or have they figured out how to fix it etc.?? Thank you, Tom
By tlyczko on
11/13/2007 3:15 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Is human friendly still search friendly?
By bluetest on
11/13/2007 7:35 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
1) Privacy and terms are never indexed! only content that is inside modules which suports the IPortable interface. 2) Search doesn't work with humanfriendly urls if you use any special character, search for two and more words or use the"+" inside. fix: DNN6708 3) other related issues: DNN6716, DNN6713
By cshark on
11/14/2007 8:33 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Isn't it about time someone at DNN fixed the problem with comments in blogs?
By rodweir on
11/14/2007 8:33 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Why is the markup of this blog so messed up?? All the line breaks are shown as , which makes it hard to read.
By tlyczko on
11/14/2007 8:33 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
for hyphens in the URL, you can use Scott Ventrian dll which is working perfeclty. I have implemented it on my website, works great !!
DV
By Declic Video on
11/18/2007 2:09 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
I have been experimenting with the Human Friendly URL provider. Initially, I did experience problems with the search: Submitting the search simply refreshed the page rather than taking me to the seach page. However, after reindexing the search from Host, it seems to be working normally. I don't know if this is why it's now working, but I thought it might be helpful to at least report my experience. In any case, I really like it so far!
By YodaRocks on
11/18/2007 2:02 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
I'm confused - Did Bruce Chapman's code make it into 4.7 or do we need to install his version separately from 4.7. In any event, it sounds like this will help us with re-directing old non DNN URLs. THANKS!!
By dondoss on
11/26/2007 7:51 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Bruce's version is separate, he recently updated it, one must install it separately from 4.7. HTH Tom
By tlyczko on
12/17/2007 10:07 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Is it possible to write a custom rule which filters out & for ampersand and all characters following the ; semi-colon??
Thank you, Tom
By tlyczko on
1/6/2008 3:03 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
@dondoss (and others)
No, nothing I have written is in the DNN core (AFAIK, anyway!). If you want to have any of these features: - 301 redirects for 'old' DNN urls (ie tabid/33/home/default.aspx to redirect to /home.aspx) - replacing spaces with a character of your choice - support for changing/removing the .aspx page extension - 301 redirects for expired/deleted pages - 301 redirects to a single subdomain (either www, no subdomain or anything else) - forcing all url's to be generated in lower case - support for DNN 4.0-4.8
Then you need to download the iFinity Friendly Url Provider from the Free DotNetNuke Downloads page on ifinity.com.au
It is a simple drop-in install and the instructions are provided with the download. This version is a lot more stable than the earlier releases available in december '07.
-Bruce
ps I also have a version under development which will expand the field to allow you to define ANY valid Url and redirect it to a DNN page, all with a GUI interface instead of XML file authoring.
By brucerchapman on
2/15/2008 12:27 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Hi,
I have tried it with the hyphens and it does not work.
I get a 404 error.
Lee
By LeeB on
5/12/2008 7:50 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Anyone care to tell me why this is not turned on by default? (Not that I'm surprised its not) Ok, I understand why it wasn't for 4.7 but seriously people theres been several versions since, and the urls in their default state are seriously rubbish.
Would be nice if the usable urls flowed on beyond just the pages so tht things like the blog and forum modules had decent urls as well. Sigh.
By deanjrobinson on
12/2/2008 10:31 PM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
I have this Url:
localhost/dotnetnuke_2/products/Tabid/66/default.aspx
and to help the site to give higher SEO ranking I changed it to:
localhost/dotnetnuke_2/products/cars/ferrari/Tabid/66/default.aspx
only the link was change but the system still works. Now the new Urls look like this:
localhost/dotnetnuke_2/products.aspx
but the following does NOT work:
localhost/dotnetnuke_2/cars/ferrari/products.aspx
...any idea on how the HumanFriendly Urls can also have this feature?
By Evan Camilleri on
12/29/2009 12:23 AM
|
Re: Turn on HumanFriendly URLs in DNN 4.7.0
Hello
We want to remove the /dotnetnuke/ from all 300 pages of our website that has been running since Feb 09.
Google isn't indexing all of our pages just 98. I'm thinking that the /dotnetnuke/ is causing our content to be too deep in our site for Google to find(?)
We also don't have any Page Rank although our site appears on page one for most search queries. Obviously we don't want to lose our position in Google.
Would you advise that we do remove the /dotnetnuke/ in our urls and if so should we create a new site and use 301 redirects or is there a way of removing the /dotnetnuke/ from our existing urls but still keeping our Google history?
Many thanks
By SystemsBarbie on
3/2/2010 11:33 PM
|
|