I need to run the application I wrote with symfony 6 in a subfolder. There will be 2 applications in the same domain. I defined virtual host in .htaccess file but it didn't work. I define rewrite base but it doesn't work. symfony detects the folder name as domain.com/folder route and says route not found.
<VirtualHost *:80>
DocumentRoot /controlpanel/public
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/$1 !-f
RewriteRule ^/controlpanel/(.*)$ /controlpanel/index.php [QSA,L,PT]
Alias /controlpanel /controlpanel/public
<Directory /controlpanel/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Can you provide an example htaccess where I can do this. Or will the directoryroot part of the virtual host be the directory where the project is located on the server? I'll be happy if you can help me. thanks