Multi site asset urls

Hi all,

Currently I have a multi domain setup in the structure kirby/domains/ where index.php, site.php etc. is in the kirby folder.

I was wondering if there’s an easy way to make the assets urls look nice again eg. eliminating the domain/ form the asset URL.

I imagine there’s something simple you can do with .htaccess but I don’t know enough to know how.

Much appreciated.

I seem to be good at answering my own questions.

What I ended up using:

RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$
RewriteRule ^assets/(.*)$ domains/%1/assets/$1 [L,N]