Hello!
Well, if my comment helps anyone.
See, it is possible to have an application with the index in webroot, according to the documentation.
In the documentation it is also exemplified how to redirect to another path outside the webroot, if you like.
"If your site is not at the webroot level you will have to uncomment the Rewritebase statement and Adjust the path to point to your directory, relative from the webroot."
So for those who still have doubts, you can find out at: http://silex.sensiolabs.org/doc/master/web_servers.html
I will leave here a configuration that can help:
An example for an app with the files in the 'web' folder and the Silex core in webroot '\':
/public_html/.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ /web/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^(.*)$ /web/$1
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule ^website.com/(.*[^/])$ http://www.website.com/$1/ [R=301]
</IfModule>
/public_html/web:
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
Maybe that page of the documentation can help.
– stderr
@Qmechanic73 I did as explained and it didn’t work. See if I did it correctly. (http://pastebin.com/JDAGtd2f)
– Joao Nivaldo