I've been making a website using Silex, with my dispatcher and an .htaccess inside the web/ folder, with the following rules :
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
I have also configured Apache's virtual host with the following rules :
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.localhost
DocumentRoot "c:/wamp/www/FarmaDubno/web"
ServerName FarmaDubno
ServerAlias FarmaDubno
ErrorLog "logs/FarmaDubno-error.log"
CustomLog "logs/FarmaDubno-access.log" common
</VirtualHost>
Now that the website is finished, I want to put it online. However, I didn't find such thing as a document root in the hosting service's parameters. So I asked them what they suggested to do, and they told me the only way was with a .htaccess redirecting to the web/ folder.
The thing is : if I put the document root outside the web/ folder, the user might be able to go to the other folders of the project (such as app/, db/ or vendor/).
Any idea ?