Try these rules in your .htaccess file:
RewriteEngine on
Options +FollowSymlinks -MultiViews
RewriteCond %{REQUEST_URI} !^/desktop/ [NC]
RewriteCond %{HTTP_USER_AGENT} ^.*(MSIE.*Windows NT|Lynx|Safari|Opera|Firefox|Konqueror) [NC]
RewriteCond %{HTTP_USER_AGENT} !(^.*(Opera Mini|SymbianOS|Mobile)) [NC]
RewriteRule ^(.*)$ /desktop/$1 [L,R=302,NC]
Update (combined with wordpress rules)
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks -MultiViews
RewriteCond %{THE_REQUEST} !^GETs/wp-login.php [NC]
RewriteCond %{REQUEST_URI} !^/(desktop/|wp-admin/|wp-login.php) [NC]
RewriteCond %{HTTP_USER_AGENT} ^.*(MSIE.*Windows NT|Lynx|Safari|Opera|Firefox|Konqueror) [NC]
RewriteCond %{HTTP_USER_AGENT} !(^.*(Opera Mini|SymbianOS|Mobile)) [NC]
RewriteRule ^(.*)$ /desktop/$1 [L,R=302,NC]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(desktop/|wp-admin/|wp-login.php) [NC]
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
R=302 will redirect with https status 302
L will make last rule
NE is for no escaping query string
$1 is your REQUEST_URI
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…