I need to create a redirection from my own subdomain to an external subdomain, like subdomain.domain.com -> subdomain.external.com. So if anyone try to enter in my subdomain, it redirects automatically to subdomain.external.com.
Thanks all.
EDIT:
I tried via DNS in cPanel/WHM with CNAME and in .htaccess with:
<IfModule mod_rewrite.c>
RewriteEngine On
SetEnv HTTP_MOD_REWRITE On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com$ [NC]
RewriteRule ^(.*)$ https://subdomain.external.com/$1 [R=301,NC,L,QSA]
</IfModule>
But nothing works :/