Thanks, Kevin.

On Thu, Nov 1, 2012 at 10:42 AM, Kevin A. McGrail <kmcgr...@pccc.com> wrote:

> On 11/1/2012 12:59 AM, ABHISHEK GUPTA wrote:
>
>> I want to configure apache in a way that all the request from mobile
>> browsers are redirected to a separate virtualhost and requests from desktop
>> browsers are served from another virtualhost.
>>
>
> Abhishek,
>
> Because I recommend that the mobile site have a choice to choose to view
> the full site, this is likely best handled on the full site with a user
> agent check that then redirects to the mobile site coupled with a cookie
> check.
>
> However, mod_rewrite would be the likely answer based on user agent if you
> wanted to implement it that way. http://httpd.apache.org/docs/**
> 2.4/rewrite/access.html<http://httpd.apache.org/docs/2.4/rewrite/access.html>has
>  an example access control with user agent but instead using the
> condition to redir with a rule such as (untested):
>
> RewriteCond %{HTTP_USER_AGENT}   ^iPad
> RewriteRule ^(.*)         http://mobile.mysite.com/$1 [L,R=permanent]
>
> Regards,
> KAM
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@httpd.**apache.org<users-unsubscr...@httpd.apache.org>
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

Reply via email to