Adding a view desktop link to mobile site
I don't know about X-AH-Mobile-Redirect, but I did this a while ago by creating a link like http://example.com/?device=desktop and on page load I would check for $_GET['device'] and for a cookie

Then I could just check

if (isset($_GET['device']) &amp;&amp; $_GET['device'] == 'desktop') {
    setcookie('mycookie', 'true', strtotime('+365 days'));
    $mobile_browser = 0; //This forces site into desktop mode
}


Then on desktop version you just go the other way around with a http://example.com/?device=mobile

if (isset($_GET['device']) &amp;&amp; $_GET['device'] == 'mobile') {
    setcookie('mycookie', null, -1); //Unset cookie
}


Of course you have to add whatever you need to force your mobile detector to go into mobile/desktop version, but it's pretty much it, on page loads check for the cookie and for the query strings and act accordingly.