Options FollowSymLinks
AddDefaultCharset utf-8
<IfModule mod_rewrite.c>
RewriteEngine On
# the main rewrite rule for the frontend application
RewriteRule !^/web /web%{REQUEST_URI} [L]
# if a directory or a file of the frontend application exists, use the request directly
RewriteCond %{REQUEST_URI} ^/web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule . /web/index.php [L]
RewriteCond %{REQUEST_URI} .(htaccess|htpasswd|svn|git)
RewriteRule .(htaccess|htpasswd|svn|git) - [F]
</IfModule>