I need to redirect myservice.example.com to www.example.com/myservice
My try so far: adding a new config to apache2, doing a2ensite and restarting apache2:
<VirtualHost *.80>
DocumentRoot /var/www/html
ServerAdmin [email protected]
ServerName myservice.example.com
RedirectPermanent / https://www.example.com/myservice
</VirtualHost>
<VirtualHost *.443>
DocumentRoot /var/www/html
ServerAdmin [email protected]
ServerName myservice.example.com
RedirectPermanent / https://www.example.com/myservice
</VirtualHost>
but when i enter myservice.example.com apache2 serves me www.example.com, not www.example.com/myservice
What am I missing?