I'm managing a website written in symfony 2.2, hosted on a web hosting service. I'm pretty much a complete neophite in web development, so I'm probably making some stupid mistake.
Anyway, I want to be able to access the site without the /web part. Example: 'domain.com/symfony_site/web/mypage' -> 'domain.com/symfony_site/mypage'.
Let me say from the start: I cannot manually configure apache on the server, I only have FTP access to it. I think I'm left with .htaccess files solution.
I have tried each and everyone of the solutions I found on the internet (most of them from this site) and none worked. And yes, mod_rewrite is enabled.
I feel like the simplest solution would be to add a .htaccess file in the root directory of the site (the one which also contains the /web folder), with the following content:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /web/$1 [QSA,L]
</IfModule>
And this does seem to redirect properly, but then I get a "The requested URL web/mypage was not found on this server." if I visit 'domain.com/symfony_site/mypage'.
The desired home page 'domain.com/symfony_site' intead gives a "You don't have permission to access /symfony_site/ on this server.", so it looks like this is not even redirecting properly.
web/app.phpfile to anindex.phpfile at the root of your site? (it will also require to change the paths in this file)domain.com/symfony_site/mypage/web?