<IfModule mod_rewrite.c>
    RewriteEngine On

    AddDefaultCharset UTF-8

    Options -Indexes
    Options +SymLinksIfOwnerMatch
    # Options +SymLinksifOwnerMatch

    # RewriteBase /

    # Redirecting HTTP to HTTPS
    # RewriteCond %{SERVER_PORT} 80
    # RewriteRule ^(.*)$ https://your-website.com/$1 [R,L]

    # Allow harmless files
    RewriteCond %{REQUEST_URI} !\.(?:css|js|map|jpe?g|gif|png|svg|webp)$ [NC]
    # Allow file upload handler
    RewriteCond %{REQUEST_URI} !^(^|/)imanager/upload/server/php($|/.*$)$ [NC]
    # Block access to any htaccess files
    RewriteCond %{REQUEST_URI} ^(.*/)?\.(htaccess|data|imanager|modules|core|lang|boot.php|themes.*_.*)($|/.*$) [NC]
    # If any conditions above match, issue a 403 forbidden
    RewriteRule ^.*$ - [F,L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^editor/(.*)$ editor/index.php?id=$1 [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?id=$1 [L,QSA]
</IfModule>