Rewrite rule for subdomain and subdirectory (self-hosted)

How can I modify the .htaccess file so it converts the URL to the following (hide the public part)

from: accounts.domain.co.uk/v4/public/dashboard

to: accounts.domain.co.uk/v4/dashboard

turning on the following line only works when the document root points to the v4 subfolder:
RewriteRule ^(.*)$ public/$1 [L]

Hi,

Sorry, I don’t have the answer.

In general we recommend mapping the server webroot to the public folder instead.