<p>What is the best way to transparently rewrite a URL over an SSL connection with Apache 2.2?</p>

<p>Apache 2 does not natively support multiple name-based virtual hosts for an SSL connection and I have heard that mod_rewrite can help with this. I would like to do something like this:</p>

<p>I have set up the server so that the sites can be accessed by</p>

<p><a href="https://secure.example.com/dbadmin" rel="nofollow noreferrer">https://secure.example.com/dbadmin</a></p>

<p>but I would like to have this as <a href="https://dbadmin.example.com" rel="nofollow noreferrer">https://dbadmin.example.com</a></p>

<p>How do I set it up so that the Rewrite rule will rewrite dbadmin.example.com to secure.example.com/dbadmin, but without displaying the rewrite on the client's address bar (i.e. the client will still just see dbadmin.example.com), all over https?</p>

There is apaches mod_rewrite, or you could setup apache to direct
https://dbadmin.example.com
to path/to/example.com/dbadmin on the server
```
```
<VirtualHost *>
ServerName subdomain.domain.com
DocumentRoot /home/httpd/htdocs/subdomain/
</VirtualHost>
```
```