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)



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


Sorry, I don’t have the answer.

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