<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Redirect iPhone, Blackberry, &amp; Palm Requests With .htaccess</title>
	<atom:link href="http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess/feed" rel="self" type="application/rss+xml" />
	<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess</link>
	<description>Become a Better Developer, One Tip at a Time.</description>
	<lastBuildDate>Tue, 27 Sep 2011 18:42:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Miles</title>
		<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess#comment-2057</link>
		<dc:creator>Miles</dc:creator>
		<pubDate>Tue, 13 Sep 2011 15:28:20 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=155#comment-2057</guid>
		<description>I created a subdomain(mobile.mydomain.com) that pointed to a folder (mydomain.com/mobile)

I modified my .htaccess file in my domain&#039;s root directory with the code above.

I added a .htaccess file in the subdomain folder (mydomain.com/mobile)
 with one line.

RewriteEngine off


That fixed the redirect loop for me.</description>
		<content:encoded><![CDATA[<p>I created a subdomain(mobile.mydomain.com) that pointed to a folder (mydomain.com/mobile)</p>
<p>I modified my .htaccess file in my domain&#8217;s root directory with the code above.</p>
<p>I added a .htaccess file in the subdomain folder (mydomain.com/mobile)<br />
 with one line.</p>
<p>RewriteEngine off</p>
<p>That fixed the redirect loop for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WebDesign: iPhone erkennen und umleiten &#124; Technokrat</title>
		<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess#comment-1928</link>
		<dc:creator>WebDesign: iPhone erkennen und umleiten &#124; Technokrat</dc:creator>
		<pubDate>Thu, 25 Nov 2010 15:28:10 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=155#comment-1928</guid>
		<description>[...] Brian Cray schreibt in seinem Blog www.dev-tips.com über eine Serverseitige Variante per .htaccess. Allerdings ist bei dieser Methode Vorsicht geboten, da fehlerhafte Einträge die Funktionalität einer ganzen Website gefährden können. Zum betreffenden Artikel gelangt ihr hier. [...]</description>
		<content:encoded><![CDATA[<p>[...] Brian Cray schreibt in seinem Blog <a href="http://www.dev-tips.com" rel="nofollow">http://www.dev-tips.com</a> über eine Serverseitige Variante per .htaccess. Allerdings ist bei dieser Methode Vorsicht geboten, da fehlerhafte Einträge die Funktionalität einer ganzen Website gefährden können. Zum betreffenden Artikel gelangt ihr hier. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: themisfit</title>
		<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess#comment-1868</link>
		<dc:creator>themisfit</dc:creator>
		<pubDate>Mon, 04 Oct 2010 07:11:51 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=155#comment-1868</guid>
		<description>this code seems to work for me for the iphone at least.

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} iPhone
RewriteCond %{REQUEST_URI} !^/iphone/
RewriteRule .* /iphone/ [R]</description>
		<content:encoded><![CDATA[<p>this code seems to work for me for the iphone at least.</p>
<p>RewriteEngine on<br />
RewriteCond %{HTTP_USER_AGENT} iPhone<br />
RewriteCond %{REQUEST_URI} !^/iphone/<br />
RewriteRule .* /iphone/ [R]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Wells</title>
		<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess#comment-1845</link>
		<dc:creator>David Wells</dc:creator>
		<pubDate>Tue, 10 Aug 2010 21:24:20 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=155#comment-1845</guid>
		<description>@Tom,

I see the issue with the redirect loop. The page I am trying to forward to is using the same htaccess. 

What is the condition syntax to &quot;add a condition at the top of your htaccess.&quot;

Thanks.
Here is the redirect:

#redirect mobile browsers
RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$
RewriteRule ^(.*)$ http://www.davidgregorywells.com/social [R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*iPad.*$
RewriteRule ^(.*)$ http://www.davidgregorywells.com/social [R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*BlackBerry.*$
RewriteRule ^(.*)$ http://www.davidgregorywells.com/social [R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*Palm.*$
RewriteRule ^(.*)$ http://www.davidgregorywells.com/social [R=301]</description>
		<content:encoded><![CDATA[<p>@Tom,</p>
<p>I see the issue with the redirect loop. The page I am trying to forward to is using the same htaccess. </p>
<p>What is the condition syntax to &#8220;add a condition at the top of your htaccess.&#8221;</p>
<p>Thanks.<br />
Here is the redirect:</p>
<p>#redirect mobile browsers<br />
RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$<br />
RewriteRule ^(.*)$ <a href="http://www.davidgregorywells.com/social" rel="nofollow">http://www.davidgregorywells.com/social</a> [R=301]<br />
RewriteCond %{HTTP_USER_AGENT} ^.*iPad.*$<br />
RewriteRule ^(.*)$ <a href="http://www.davidgregorywells.com/social" rel="nofollow">http://www.davidgregorywells.com/social</a> [R=301]<br />
RewriteCond %{HTTP_USER_AGENT} ^.*BlackBerry.*$<br />
RewriteRule ^(.*)$ <a href="http://www.davidgregorywells.com/social" rel="nofollow">http://www.davidgregorywells.com/social</a> [R=301]<br />
RewriteCond %{HTTP_USER_AGENT} ^.*Palm.*$<br />
RewriteRule ^(.*)$ <a href="http://www.davidgregorywells.com/social" rel="nofollow">http://www.davidgregorywells.com/social</a> [R=301]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SkipSoft</title>
		<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess#comment-1842</link>
		<dc:creator>SkipSoft</dc:creator>
		<pubDate>Tue, 03 Aug 2010 10:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=155#comment-1842</guid>
		<description>Thanks a lot.</description>
		<content:encoded><![CDATA[<p>Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess#comment-1808</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Tue, 22 Jun 2010 15:28:27 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=155#comment-1808</guid>
		<description>Haha no bodies understand how to use it ....

If you have a too many redirections that means you try to redirect the user to the same domain with the same htaccess and here the loop!

The solution is too redirect the user to anohter domain with no htaccess or to redirect the user to an mobile.html page and to add a condition at the top of your htaccess.

I cannot post the complete code due to my company ... but the idea is here</description>
		<content:encoded><![CDATA[<p>Haha no bodies understand how to use it &#8230;.</p>
<p>If you have a too many redirections that means you try to redirect the user to the same domain with the same htaccess and here the loop!</p>
<p>The solution is too redirect the user to anohter domain with no htaccess or to redirect the user to an mobile.html page and to add a condition at the top of your htaccess.</p>
<p>I cannot post the complete code due to my company &#8230; but the idea is here</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Artur</title>
		<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess#comment-1774</link>
		<dc:creator>Artur</dc:creator>
		<pubDate>Sat, 08 May 2010 11:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=155#comment-1774</guid>
		<description>hi, you forgot to add:
&lt;code&gt;
RewriteEngine on
&lt;/code&gt;
in a first line. It may be required if it&#039;s not globally on</description>
		<content:encoded><![CDATA[<p>hi, you forgot to add:<br />
<code><br />
RewriteEngine on<br />
</code><br />
in a first line. It may be required if it&#8217;s not globally on</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Redirigir iPhone, Blackberry y Palm desde .htaccess &#124; Sentido Web</title>
		<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess#comment-1752</link>
		<dc:creator>Redirigir iPhone, Blackberry y Palm desde .htaccess &#124; Sentido Web</dc:creator>
		<pubDate>Mon, 12 Apr 2010 07:34:41 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=155#comment-1752</guid>
		<description>[...] Redirect iPhone, Blackberry, &amp; Palm Requests With .htaccess [...]</description>
		<content:encoded><![CDATA[<p>[...] Redirect iPhone, Blackberry, &amp; Palm Requests With .htaccess [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Is cooming &#187; Blog Archive &#187; iPad Detection Using JavaScript or PHP</title>
		<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess#comment-1748</link>
		<dc:creator>Is cooming &#187; Blog Archive &#187; iPad Detection Using JavaScript or PHP</dc:creator>
		<pubDate>Sat, 10 Apr 2010 23:21:30 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=155#comment-1748</guid>
		<description>[...] some logic from Drew Douglass’ excellent mobile redirection post, we can redirect users to a mobile version of your website if you so [...]</description>
		<content:encoded><![CDATA[<p>[...] some logic from Drew Douglass’ excellent mobile redirection post, we can redirect users to a mobile version of your website if you so [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iPad Detection Using JavaScript or&#160;PHP &#124; Shop Rate</title>
		<link>http://dev-tips.com/featured/redirect-iphone-blackberry-palm-requests-with-htaccess#comment-1746</link>
		<dc:creator>iPad Detection Using JavaScript or&#160;PHP &#124; Shop Rate</dc:creator>
		<pubDate>Thu, 08 Apr 2010 21:46:13 +0000</pubDate>
		<guid isPermaLink="false">http://dev-tips.com/?p=155#comment-1746</guid>
		<description>[...] some logic from Drew Douglass&#8217; excellent mobile redirection post, we can redirect users to a mobile version of your website if you so [...]</description>
		<content:encoded><![CDATA[<p>[...] some logic from Drew Douglass&#8217; excellent mobile redirection post, we can redirect users to a mobile version of your website if you so [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

