A have symfony5 project. When I hosted to server I changed the default host path from https://example.com to https://example.com/public, because index.php is in /public folder. From then my site works only on the homepage. When I navigate to the other pages Apache returns 404. "The requested URL /bio/ was not found on this server". Everything works on localhost but not on the host.
You should change the DocumentRoot on Apache to point to the public folder and therefore, the url will point to the public folder without it being present in your url.
Here is an example of a VirtualHost Apache allowing you to listen to the website.loc url and point to the public folder linked to this website (it may not be complete):
<VirtualHost *:80>
DocumentRoot "/path/to/website/public/"
ServerName webiste.loc
DirectoryIndex index.php
ErrorLog "/var/log/httpd/error_log"
CustomLog "/var/log/httpd/access_log" common
<Directory "/path/to/website/public/">
AllowOverride none
Order allow,deny
Allow from all
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
</Directory>
</VirtualHost>
If it doesn't work, can you give us the configuration of your VirtualHost on Apache? Watch out for sensitive info that may be present.