When a mobile user views my site they are redirected to a mobile version. I have a “view full” option to allow them to view the actual site instead. Problem is when they do they will get redirected back. Is there away to bypass the redirect or only redirect the first time?
Share
As far as I know, almost all mobile browsers have basic cookie support. PHP
setcookie(documentation here) will allow you to do something like this:Where
MOBILEis defined ahead of time. You’re also free to use a string here.The upside is you won’t have to worry about the query string once this cookie is set. SLaks‘ solution will work, but you would have to pay attention to append
redirect=falseto every URL that has a redirect-checker.