htaccess redirect except 1 page

Discussion in 'Programming' started by adamjblakey, Jul 11, 2011.

  1. #1
    Hi,

    I am using the following code to redirect my site to a mobile site:

    
    #redirect mobile browsers
    RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$
    RewriteRule ^(.*)$ http://www.mysite.mobi/ [R=301]
    RewriteCond %{HTTP_USER_AGENT} ^.*BlackBerry.*$
    RewriteRule ^(.*)$ http://www.mysite.mobi/ [R=301]
    RewriteCond %{HTTP_USER_AGENT} ^.*Palm.*$
    RewriteRule ^(.*)$ http://www.mysite.mobi/ [R=301]
    
    Code (markup):
    Which works fine however i have one URL which is:

    http://www.mysite.co.uk/adminxx/login

    That i dont want redirected if i go to this on my mobile. Is there a way to do this?

    Cheers,
    Adam
     
    adamjblakey, Jul 11, 2011 IP