Redirect Subdomain to another server

Asked

Viewed 1,377 times

1

I’m using the cPanel and I can redirect the domain exemplo.dominio.com.br to another server using record A and IP of the new server, but how do I make this subdomain accessible also using www or without www?

It would be in the redirect settings or on htaccess of the new server?

  • But www is already a subdomain. Someone would access www.exemplo.dominio.com.br?

1 answer

1


I don’t know Cpanel very well, but I know that you can perform this access with www and without www changing your vhost, pointing the vhost with www and without www to the same folder, for example:

<VirtualHost *:80>
    DocumentRoot /var/www/dominio.com.br
    ServerName www.dominio.com.br
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /var/www/dominio.com.br
    ServerName dominio.com.br
</VirtualHost>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.