Routing with a shared certificate

I have a site that uses a shared SSL certificate. The domain for most
parts is mydomain.com, but the SSL areas must be addressed as

https://hostdomain/secure/mydomain.com/

How do I deal with this?
I can use the full url to get to the controllers, as in for example

https://hostdomain/secure/mydomain.com/items/

but nothing else gets found - no stylesheets, images, or layouts. How
do I handle the routing?