I realize this is a pretty old thread already, but am struggling with serving up a mobile-ready login page that actually logs in. I'm more web designer than hotspot code manipulator...
I have a login.html page which has an auto javascript redirect if a mobile / handheld device is detected - this is working very well and goes to mobilogin.html. This means non-mobile users see the full version of the login.html page for laptop/desktop screen, while mobile users see a login page optimized for their smaller screens - each with an associated css file.
For interest sake, here's the javascript redirect code:
<script language=javascript>
var redirectagent = navigator.userAgent.toLowerCase(); var redirect_devices = ['vnd.wap.xhtml+xml', 'sony', 'symbian', 'nokia', 'samsung', 'mobile', 'windows ce', 'epoc', 'opera mini', 'nitro', 'j2me', 'midp-', 'cldc-', 'netfront', 'mot', 'up.browser', 'up.link', 'audiovox', 'blackberry', 'ericsson', 'panasonic', 'philips', 'sanyo', 'sharp', 'sie-', 'portalmmm', 'blazer', 'avantgo', 'danger', 'palm', 'series60', 'palmsource', 'pocketpc', 'smartphone', 'rover', 'ipaq', 'au-mic', 'alcatel', 'ericy', 'vodafone', 'wap1', 'wap2', 'teleca', 'playstation', 'lge', 'lg-', 'iphone', 'android', 'htc', 'dream', 'webos', 'bolt', 'nintendo']; for (var i in redirect_devices) {if (redirectagent.indexOf(redirect_devices) != -1) {location.replace("mobilogin.html");}}
</script>
Then the trouble starts... As soon as I login on the mobilogin.html page, it of course redirects to the previous url - namely login.html. Which then redirects to mobilogin.html... I end up in a lovely circle of login and redirect!
How do I get mobilogin.html to auto-redirect to a page TWO urls back, the one the client was trying to access before the first login page showed up? Or to simply login and proceed to the wider web? Is there a way to manipulate the "dst" command?
::update::
Have created a mobi folder (similar to creating a different language folder), with a login.html specific to mobile devices. I now can login, and then hit the status page - nothing further. Will update this post if and when I find a work-around, as I'm sure I'm not the only one struggling on.
::update2::
Am about to give up trying to find a way around the link-redirect to get it to go back to session start / url request / browser home page that triggered login.html - and simply set that to the company website home page.
::update3::
Right - so now the mobile login.html will load the status page (and not further) - but only if Cookies are enabled on the hotspot and the user has been there before. If Cookies are not enabled, the login.html generates loop after loop until I end up with a url that looks like 192.168.../mobi/mobi/mobi/mobi/mobi etc... Is there ANYONE out there that can help get this thing to work?