# If mod_rewrite is available, enable clean path routing
<IfModule mod_rewrite.c>
    RewriteEngine On

    # Base path (safe even if deployed in subdirectory)
#    RewriteBase /

    # Do not rewrite existing files or directories
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Route everything else to front controller
    RewriteRule ^ index.php [L]
</IfModule>

# If mod_rewrite is NOT available:
# - Apache will serve files normally
# - Clean URLs will not work
# - Query-string routing (?view= / ?action=) still functions
