When we are using .htaccess, how can you redirect all admin pages in Magento to another domain and subdirectory?

  • RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
    RewriteCond %{REQUEST_URI} !admin
    RewriteCond %{REQUEST_URI} !index.php [NC]
    RewriteRule ^ http://www.example.com/landing [R=302,L]

  • RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/index.php/admin [NC]
    RewriteRule ^ — [L]
    RewriteCond %{THE_REQUEST} !/new/ [NC]
    RewriteRule !^new/ /new%{REQUEST_URI} [NC,R=301,L]

  • RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/index.php/admin [NC]
    RewriteRule ^ — [L]
    RewriteCond %{THE_REQUEST} !/new/ [NC]
    RewriteRule !^new/ /new%{REQUEST_URI} [NC,R=301,L]

  • All of the above

stackoverflow.com/a/39352853