Migrating the Search Engine Friendly Urls of a Joomla Site to DotNetNuke
Sep
9
Written by:
Friday, September 09, 2011 9:06 PM
Lately I’ve been asked the question by a few people what is the best approach to migrate Urls from a Joomla site over to DotNetNuke.
To do this, you need a couple of things:
- A good plan
- A list of all your Old urls from the Joomla site
- Software to set up your redirects
For this example I’ll be demonstrating how to do this using the Url Master module.
The example will use a lot of the material from the Migrating Html Urls to DotNetNuke and Migrating .asp Urls to DotNetNuke blog posts.
The reason is that the process is very similar, regardless of the ‘prior’ technology. The key is getting your DotNetNuke installation to ‘answer’ to the old Urls.
For this example I’m going to assume that you’ve either already switched over your domain name to the DotNetNuke site, or are planning to very soon.
With the Url Master, all of the Url actions are independent of the domain name. That is, you can setup and test out redirects on a temporary domain name, safe in the knowledge that when you come to switching over the site ‘live’, once the real domain name is swapped in, all the redirects are going to behave as expected. You don’t need to enter them twice or anything like that.
Step 0 : Backup
You’ll be making changes to the web.config file, and adding things into the database. Do a backup now so you can always get back to where you were if something goes wrong.
Step 1 : Install the Url Master module
You’ll need the Url Master module. Any other way of doing it will be difficult and involve lots of dealing with IIS redirects and messing about. We’re here to save time and do it right the first time, so get the best software for the job! Download the software from the Url Master Product Page. If you’re new to this software, then you can get a free trial here. It costs nothing to install and trial, and if it works (which it will!) then you can purchase later after you’ve solved your problem. Just obtain the install package, load it into DotNetNuke via the module installer, and move onto step 2.
Step 2 : List out all your redirects
If you’re in this situation because you’ve switched over your site and now your search traffic has disappeared, you need to act fast. If you’re in the planning stages, you’ve got more time. Either way, you need to build up a comprehensive list of Urls that point at the existing or old Joomla site. The best idea is to make a list of these Urls and put them into a spreadsheet, so you can put in the ‘destination’ Url next to it, and check off each as you go.
You’ll never guess or remember all the urls, so you can go to a search engine and ask them for the list of Urls they have. You might do this through a Webmaster console, or you can do a site:example.com search. I suggest using Yahoo, Bing and Google as each will give you a slightly different list and you can get better coverage.
Once this list is complete, you’ll need a list of Urls you are going to redirect to. For each ‘old’ Url, you’ll need to identify a new Url. Try and resist the temptation to redirect everything to the home page of the new site. A bit of intelligent redirecting will keep your users happy as they follow links, and will help your search engine rankings by making sure relevant keywords and links still point to relevant pages. So point your ‘product’ urls at your Product page, and your ‘about’ Urls at your new ‘About’ page, and so on. There is no restriction on how many redirects point to the same page, so just come up with the best compromise where you can. There are no hard and fast rules, but a bit of common sense will go a long way.
Joomla is a bit like DotNetNuke in that it has had a history of different Url schemes, and there are third-party products on the market to change the default Joomla Urls.
Originally, Joomla had querystring-driven Urls, like this :
example.com/index.php?option=com_content&taske=view&id=2344&itemid=26
This is similar to the original DNN Format of example.com/default.aspx?Tabid=45
Then, the standard Urls went more human friendly and looked like this:
example.com/index.php/the-new/joomla-overview/faq
This is similar to the original Friendly Url solution for DNN which gave urls of example.com/tabName/tabid/45/default.aspx
Some Joomla sites will have very friendly Urls, some will have less. It doesn’t really matter, because we aren’t going to ‘unpack’ the Urls, we are just going to point the old ones at the new DNN pages.
Step 3 : Map the correct extension to ASP.NET
If your Joomla Urls end with .php, then you will need to map the .php extension to DNN.
If your Joomla Urls don’t have any extension (ie. ends with something like /my-page or /my-page/) then you will need to setup Wildcard Mapping.
Because DotNetNuke runs by default using .aspx, then any of the other extensions on the Url aren’t going to be processed by ASP.NET, and thus DotNetNuke, if you don’t map the extension correctly.
Step 3a : .php Extensions to be redirected
IIS 6.0 - Windows 2003 Server
- open property page for website / virtual directory.
- click the 'home directory' tab
- click the 'configuration' button, select the 'mappings' tab
- add a new mapping, and enter the .php extension
- set the executable value by browsing to the aspnet_isapi.dll (normally at c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll)
- Ensure that 'check that file exists' is unchecked
- Click OK, OK, OK to close and apply changes
IIS7 – Windows Server 2008 (and later)
IIS7 is different from IIS6 in that you can make changes to the handler mappings through either the user interface, or through the web.config directly. In this case the example will be given to make changes to the web.config file, as this is faster and many people on shared hosting don't have access to the administration console.
You will also need to know whether your site is running on a 64 bit server, or a 32 bit server, though you can just enter both settings and let the server work out which one is correct for it. Note that for these changes, it's not important if you're using IIS7 Classic or Integrated Pipeline mode.
To associate the .php extension, you have to create a new handler entry for *.php. This is done by opening up the web.config file and adding this entry at the bottom of the existing list of entries in the <system.webserver><handlers> section.
For a 32 bit server:
<add name="php urls" path="*.php" verb="GET" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="4194304" />
For a 64 bit server:
<add name="php urls 64" path="*.php" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
Note that if you don't know if you're on 32 bit or 64 bit, you can add both entries – the correct one will be used and the incorrect one will be ignored. Note – you have to match the .NET Framework location with the correct .NET framework version your site is using. Use the other entries in the web.config as a guide to which one to use.
Once this is done, when you request a .php Url, you should end up running the ASP.NET runtime. This should be easy to detect, because the Url will probably result in a 404, and it should be the ASP.NET 404 page you see, not the default IIS 404 page. This is the easiest way to tell if you have set it up correctly.
Step 3b : Wildcard mapping required
To set up wildcard mapping to process Urls without any extension at all, please follow the instructions located in the Url Master Knowledge Base for Switching off Page Extensions in IIS.
Step 4 : Adding redirects into the Url Master module
By this stage your old Urls should be making your DNN site run, but should be failing because they don’t point to anything. Now you’ll create new redirects in Url Master to capture those redirects and point them in the direction of the right DNN pages.
To do this, go to the Admin->Portal Urls page within Url Master, and select the destination page in your DNN site. That is, the page where you want your visitors to end up on when they click on an old Url.

Above : The Admin->Portal Urls page
For each redirect you need to create, click on the ‘Add New Url’ (ensure you’ve selected the correct destination page before doing this). You will see a new line added to the bottom of the list of the Urls, with a yellow entry box. Add in your ‘old’ Url, omitting the part that matches the domain. In the above example, ‘http://www.dotnetnuke.test’ is the domain, so this part isn’t entered. For Urls with no extension (top example) just enter them as –is. For those with a .php extension, add in the .php extension as shown.
NOTE: You can’t add in querystrings in this area. The Url is redirected based on the ‘stem’ of the Url – that is, everything up to the ? of the querstring. If you need to redirect on individual querystring values, a custom solution will be required, as the Url Master module doesn’t currently support querystring redirection through this User Interface. (That is an entirely separate blog post)
Make sure the ‘Http Action’ for each of the Urls is set to ‘301 – Perm Redirect’, and then click on the ‘Save Redirects Only’ button. This will save the changes to the database.
Step 5 : Testing Changes
You can switch to the ‘Test Url Changes’ tab to immediately enter the Url into the ‘Test Url Rewriting’ box, or you can just try requesting the Url in a browser. It should redirect instantly and you should end up at the new Url.
Final Thoughts
Have you tried this out and successfully transitioned from a Joomla to DNN site? Let me know via the comments, feel free to give your site a plug.
The ability to move from one web platform to another with your site is crucial, yet it gets overlooked by many platforms, or given token tools that only experts can work out, such as a bunch of redirect patterns using Regex patterns. I’m an expert in Regex and I find it tedious and difficult to work with them, because it’s so easy to make a mistake. It’s simply unthinkable that someone without a deep knowledge in this arcane field could even begin to do anything more than copy/paste and hope for the best.
I realise that many older Joomla sites need to redirect based on the querystring. Future versions of the Url Master module should have better support for these scenarios, without having to delve into sticky regex based solutions. If you have a site with this type of requirement, please get in contact via the support forums and provide the details (example Urls, etc) and I will feed that into the process of designing a way to migrate these old Urls forwards.
2 comment(s) so far...
Re: Migrating the Search Engine Friendly Urls of a Joomla Site to DotNetNuke
Bruce:
Does your solution address the issue of migrating a Joomla data base (i.e. a directory, registered user accounts) to DNN? If not, is there a solution?
Thanks, Jim
By Jim Kann on
Thursday, January 05, 2012 2:58 AM
|
Re: Migrating the Search Engine Friendly Urls of a Joomla Site to DotNetNuke
@Jim - no, this is only discussing the migration of the old Urls from Joomla sites. It doesn't cover the migration of user accounts or anything like that. I don't know of an out-of-the-box solution.
By Bruce Chapman on
Thursday, January 05, 2012 8:29 AM
|