Welcome, Guest
Username Password: Remember me

[SOLVED] ?device=desktop was not working
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: [SOLVED] ?device=desktop was not working

[SOLVED] ?device=desktop was not working 13 years, 1 month ago #6059

  • Cheeso
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Hi, I installed MJ v1.0 RC4 onto Joomla 1.7.  I had a problem and thought I'd describe how I solved it. Maybe someone else will benefit. 

I was able to see the iphone version of the site when using  the iphone; I still saw  the desktop version of the site when I used the desktop.  This was all good. 

But, in the iphone browser, when I clicked the link that appears at the bottom of the iphone page that reads "standard version" , the page refreshed and once again I saw  the iphone version of the site.  The site url in the address bar changed to server/site/?device=desktop, but the appearance of the page in the iphone browser remained the same. 

Trying server/site/?device=iphone on the desktop, I got the desktop page - in other words no change from normal. 

-------

The problem was my rewrite rule, in .htaccess. Actually I am using IIS and IIRF on Windows, not Apache and mod_rewrite, so the file to change was iirf.ini.  But they are equivalent.  Anyway, the rewriterule was silently removing the query string from the URL.  When I fixed the rewriterule to include the QSA option, everything worked fine. 

Original: 
 
## Rewrite the empty URL to index.php homepage

RewriteRule ^/($|\?)   /index.php   [L]


fixed:
## Rewrite the empty URL to index.php homepage

RewriteRule ^/($|\?)   /index.php   [L,QSA]
Last Edit: 13 years, 1 month ago by Cheeso. Reason: clarity
The following user(s) said Thank You: Barnabas
  • Page:
  • 1
Time to create page: 0.13 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.