Redirect all ServerAlias to ServerName on apache2 conf

#vi “/etc/apache2/sites-available/www2.cadena-hrmseries.com.conf”

<VirtualHost *:80>
ServerAdmin  webmaster@cadena-it.com
ServerName  www2.cadena-hrmseries.com
ServerAlias www.cadena-hrmseries.com
ServerAlias cadena-hrmseries.com
ServerAlias cadena-it.com
ServerAlias www.cadena-it.com
        UseCanonicalName Off
RewriteEngine On
RewriteCond %{HTTP_HOST}  !^www2.cadena-hrmseries.com [nocase]
RewriteRule ^(.*)$        http://www2.cadena-hrmseries.com$1 [last,redirect=301]
Include /etc/apache2/included/www2.cadena-hrmseries.com.conf
</VirtualHost>