PDA

View Full Version : Mobild/PDA problem with iPhone


v!vv0
01-16-2010, 09:01 PM
Hi guys

i have the Mobile plugin installed and its working fine with normal browser (PC/Laptop) Of while using HTC Universal or i-mate JasJar.

However if you try to open the site using iPhone ( Safari ) you get an error message :

Cannot Open page
Safari cannot open the page because too many redirects occurred.

Here is a copy of my .htaccess file :

Options All -Indexes
ErrorDocument 404 /404.php
FileETag MTime Size
php_flag session.auto_start off
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^itg-ar\.com$ [NC]
RewriteRule ^(.*)$ http://www.itg-ar.com/$1 [R=301,L]
RewriteRule ^sitemap\.xml$ index.php [L]
RewriteRule ^(.*)(\.html|\.htm)$ index.php [L]
RewriteRule ^(.*)(\.rss|\.atom)$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/?$ index.php [L]
</IfModule>

<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
ExpiresByType text/css "access plus 1 months"
ExpiresByType application/x-javascript "access plus 1 months"
</IfModule>

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

I also notified that when browsing the main website it gives me the same error message.

Any suggestions guys ? anyone have this problem ?


thanx

Alex
01-17-2010, 08:23 AM
iPhone uses same Safari as Mac does, did you try with Mac/Safari?

theodore
01-17-2010, 11:30 AM
For me this: http://www.vivvo.net/resources/dload/plugins/mobile-4-1.html

RewriteCond %{QUERY_STRING} !^version=web$ [NC]
RewriteCond %{HTTP_USER_AGENT} !(spider|crawl|slurp|bot) [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*Linux.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*Win.*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*Windows\s+CE.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*OS\s+(X|9).*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*iP(hone|od)(;|\s).*$
RewriteCond %{HTTP_USER_AGENT} !^.*Solaris.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*BSD.*$
RewriteRule ^/?$ http://www.yoursite.com/mobile/$1 [R=302,L]

.htaccess works fine also for iphone

v!vv0
02-03-2010, 09:19 PM
Thanx alot, thats what i was missing :)
didn't add those to the .htaccess

Cheers

v!vv0
02-14-2010, 10:52 AM
Hi

seems like the problem is not resolved, here is a copy of my .htaccess file, do you thing i have a loop or something ?

Options All -Indexes
ErrorDocument 404 /404.php
FileETag MTime Size
php_flag session.auto_start off
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} !^version=web$ [NC]
RewriteCond %{HTTP_USER_AGENT} !(spider|crawl|slurp|bot) [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*Linux.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*Win.*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*Windows\s+CE.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*OS\s+(X|9).*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*iP(hone|od)(;|\s).*$
RewriteCond %{HTTP_USER_AGENT} !^.*Solaris.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*BSD.*$
RewriteRule ^/?$ http://www.itg-ar.com/mobile/$1 [R=302,L]
RewriteCond %{HTTP_HOST} ^itg-ar\.com$ [NC]
RewriteRule ^(.*)$ http://www.itg-ar.com/$1 [R=301,L]
RewriteRule ^sitemap\.xml$ index.php [L]
RewriteRule ^(.*)(\.html|\.htm)$ index.php [L]
RewriteRule ^(.*)(\.rss|\.atom)$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/?$ index.php [L]
</IfModule>

<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
ExpiresByType text/css "access plus 1 months"
ExpiresByType application/x-javascript "access plus 1 months"
</IfModule>

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

I appreciate your help :) ..

Thanx in advance