21 lines · 665 B
Raw Download
1
# Front controller: route any path that is not a real file or directory
2
# through index.php. Real files (assets, admin/*.php) and directories serve
3
# directly and bypass the router.
4
5
<IfModule mod_rewrite.c>
6
    RewriteEngine On
7
8
    # If serving from a subfolder (local MAMP), match BASE_PATH here.
9
    # For the production domain root, change this to: RewriteBase /
10
    RewriteBase /
11
12
    RewriteCond %{REQUEST_FILENAME} !-f
13
    RewriteCond %{REQUEST_FILENAME} !-d
14
    RewriteRule ^ index.php [QSA,L]
15
</IfModule>
16
17
# Don't expose the config or SQL dump even if rewriting is disabled.
18
<FilesMatch "^(config\.php|schema\.sql)$">
19
    Require all denied
20
</FilesMatch>
21