RewriteEngine On

# Check if the mod_rewrite module is enabled
<IfModule mod_rewrite.c>

    # Redirect all requests to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [L,QSA]

</IfModule>

# Deny access to .htaccess itself for security reasons
<Files ".htaccess">
    Order Allow,Deny
    Deny from all
</Files>