DotNetNuke and Short URLs
Sep
25
Written by:
9/25/2009 8:02 PM
Sometimes you just need a short (or shorter URL). And when you do, it never fails to wind up being a very long URL with several parameters. For instance, if I wanted to direct you to this blog entry the normal URL would be http://www.hardyconsulting.com/AboutUs/DotNetNuke/AllThingsDotNetNuke/tabid/294/EntryId/7/DotNetNuke-short-URLs.aspx
If you think about trying to tell some one this, you can forget them remembering how to get directly there. If you are tweeting, you give them a shorten URL like http://bit.ly/17vo3w , but that hides where the link is going, and many people are reluctant to follow links like this unless they are familiar with the tweeter.
There are several ways to “skin-this-cat”. We could use a third party URL re-writing tool, or IIS re-writer. Another possibility would be a friendly URL Regex or possibly even a Request Filter Rule. HOWEVER! there is a very easy way to accomplish this. Even DNN novices can do this.
Issue: I want to have a short URL for my blog listing, and a short URL for my most recent blog so that I can tweet about them and keep my domain name listed for search engines.
Solution: Create a page with a short URL and link it to the actual page. For instance, my “All Things DotNetNuke” is buried in my menu structure. To have a short URL that people can remember I just create a page at the root level called blogs. (www.HardyConsulting.com/blogs.aspx) When creating this page, I carefully do the following:
- Make sure “Include in Menu?” is UNchecked.
- Make sure “All Users” can view page
- Under “Advanced Settings” go to the “Other Settings” area and locate the”Link Url”. For this part of the example, select “Page ( A Page On Your Site )” and select the page your blog module is on.
- Depending on how you want search engines to deal with this you can check or leave “Permanently Redirect?” unchecked.
All the rest of your page settings can pretty much be ignored.
The effect is that when you go to www.hardyconsulting.com/blogs.aspx it will actually land you on the “All Things DotNetNuke” page.
You say Great! but the page with the actual blog on it is not available in the dropdown. How do I direct to the actual blog? This problem arises because of the parameters used to show the actual blog. Again this is easy:
- Create a page called Blog, or latestblog, or whatever you want.
- Follow steps one and two above.
- For the third step, select “URL ( A Link To An External Resource )” and paste the actual URL (parameters and all) in the text box provided.
Now you can type in www.HardyConsulting.com/blog.aspx and get to http://www.hardyconsulting.com/AboutUs/DotNetNuke/AllThingsDotNetNuke/tabid/294/EntryId/7/DotNetNuke-short-URLs.aspx
EASY!
Two negative points:
- In the last example you would need to update the link every time you publish a new blog that you wanted to emphasize. It will NOT automatically go to the latest blog.
- You can easily let this get out of control and have a mess of root pages to deal with even though they don’t show up on the menu.
It is easy for those of us who have been dealing with DNN for years to forget that these simple things can make life easier for those that have never seen them in use. This may not be the BEST way to accomplish these goals, but it is something that a non-programmer or someone that does not know about Regex can do in less than 5 minutes.
If you have a way to get to the latest blog without having to go back and change something every time you post a new blog (especially if it is EASY), Leave a comment and tell us all about it!
6 comment(s) so far...
Re: DotNetNuke and Short URLs
I have used this feature myself in the past but on DNN 5.2.2 it no longer seems to work, I just get an error in firefox:
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to accept cookies.
Any ideas?
By Tony Harrison on
2/12/2010 1:41 PM
|
Re: DotNetNuke and Short URLs
Toney, it still works for me in 5.2.2. It sounds like an issue with the url. Hope this helps.
By Darrell Hardy on
2/12/2010 1:46 PM
|
Re: DotNetNuke and Short URLs
Hi
url shortener is useful product. i think it will help.
By dotnuke programmer on
5/25/2010 5:03 PM
|
Re: DotNetNuke and Short URLs
Hi!
How do i make the external link to open on a new window. if there is a solution can you please email me on:pchipendo@webkey.co.za
By Patson Chipendo on
3/8/2011 8:36 AM
|
Re: DotNetNuke and Short URLs
I Just tested in FireFox and it is working fine. The only thing I can think of is that you might be pointing the page to its self, or you are pointing a page that redirects in such a way to cause a loop.
I know this probably doesn’t help, but the first step in diagnosing a problem is replicating it. So far I have been unable to replicate your issue.
A few things you might want to try: 1) Go to http://www.hardyconsulting.com/blog (a link set up on this site) 2) Try linking to a page such as google or bing. This will make sure the functionality is working and that the link is the issue. 3) Check your url again. You may want to clip it from a browser open page so that you know you are going to a good page.
By Darrell Hardy on
3/8/2011 8:56 AM
|
Re: DotNetNuke and Short URLs
pchipendo@webkey.co.za:
You can make the URL open in its own window by wrapping the URL like this:
window.open('');
By Hope Stehling on
3/28/2011 2:17 PM
|