php - Is there a way to have a full site button on a mobile app without javascript? -



php - Is there a way to have a full site button on a mobile app without javascript? -

i redirecting mobile site based through htaccess follows:

rewriteengine on rewritecond %{http_user_agent} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [nc] rewriterule ^$ http://m.example.com/ [l,r=302]

is there someway have total site button on mobile version ignore rule if clicked? don't want utilize javascript redirect , check total site...i'm okay thought of php doing though, know htaccess gets knocked off before php rules.

you can create button/href link url:

<a href="/?desktop=1">full desktop site</a>

and alter rewrite this:

rewriteengine on rewritecond %{query_string} !(^|&)desktop=1(&|$) [nc] rewritecond %{http_user_agent} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [nc] rewriterule ^$ http://m.example.com/ [l,r=302]

javascript php .htaccess redirect mobile

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -