I have 2 servers, one at mysite.com, the other at serv2.mysite.com
I know I can redirect serv2.mysite.com/ (only the root dir, not sub directories) to mysite.com with:
Code:
But I also want serv2.mysite.com/cp (or maybe cp.mysite.com or cp.serv2.mysite.com) to redirect to serv2.mysite.com:8080/. How can I do this?
I know I can redirect serv2.mysite.com/ (only the root dir, not sub directories) to mysite.com with:
Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.$ http://mysite.com/ [L,R=301]
But I also want serv2.mysite.com/cp (or maybe cp.mysite.com or cp.serv2.mysite.com) to redirect to serv2.mysite.com:8080/. How can I do this?