I have a further problem with the redirection and its again amazing that this wasn't trapped in development or testing.
We have a mobile site that is (sadly, at the moment) non-DNN and its url is www.mycompany.com.au/mobile . When I redirect the DNN home page (www.mycompany.com.au) I get an infinite redirection loop (the bane of DNN earlier in it's existence).
The reason is that when DNN begins a request it sets the current Tab to the Home page if there is no specific Tab requested. In the Mobile redirection interface the code looks at the current tab and queries the redirection data and determines that this Tab is to be redirected. So, in my case, it finds that the Home page is to go to /mobile/default.aspx (remember a non-DNN page) and it returns this and the Mobile Redirection code then does a response.redirect to it (I wonder if Server.Transfer might be better?). This is fine - so far.
But here's the crunch - since it is a new request and DNN has no specific Tab requested it sets the currentTab to the Home page and then asks the redirection interface if this tab is to be redirected and we have an infinite redirection loop.
Fortunately, the code changes required to fix this and the addition of Query Params in the redirection call are all in the MobileRedirectModule.cs module (Library\HttpModules\MobileRedirect\MobileRedirectModule.cs) and are fairly simple.
To correct the infinite loop I look to see if the request is for a DNN page and if not then I exit the Mobile Redirection call since DNN only redirects it's own pages to Mobile pages.
And to include the Query Params I rebuild the QS without the TabID param as this confuses DNN (the redirection is to tabid=XX but the query param is for tabid=YY and DNN doesn't know which tab to create) and append it to the redirection URL.
I will be testing these changes this week. We go live next week and so I have to be sure there are no issues but so far everything seems to be OK. The DNN source files I have used are for DNN 6.2 and I don't know if my code is compatible with earlier DNN versions that include the Mobile Redirection. The DLL affected is the DotNetNuke.HttpModulesw.dll.
I'm not sure what the protocol is for this forum but I am happy to share my changes.
Neil