<IfModule mod_rewrite.c>
    RewriteEngine On

    # Page redirections
    RewriteRule ^([a-z0-9-/]*)$ public/index.php?page=$1 [L]

    # File redirections
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ public/$1 [L]

    # File protections
    RewriteRule ^config/(.*/)*.+\.yml - [F,L] # All config files
    RewriteRule ^bin/console          - [F,L] # All sources files
    RewriteRule ^fork/(.*/)*.+\.php   - [F,L]
    RewriteRule ^src/(.*/)*.+         - [F,L]
    RewriteRule ^vendor/(.*/)*.+      - [F,L]
    RewriteRule ^view/(.*/)*.+        - [F,L] # All view files
</IfModule>

# Other options
Options All -Indexes
IndexIgnore *
ServerSignature Off
Options +FollowSymLinks