
RewriteOptions inherit
<IfModule mod_rewrite.c>
    RewriteEngine on

    # if a directory or a file exists, use it directly
    RewriteCond %{REQUEST_FILENAME} !-f
    # RewriteCond %{REQUEST_FILENAME} !-d

    # otherwise forward it to index.php
    RewriteRule . index.php

    # deny access to hidden files and directories except .well-known
    RewriteCond %{REQUEST_URI} !^/\.well-known
    RewriteRule ^(.*/)?\.+ - [F]

    # deny access to composer.json that is used for remote fingerprinting
    RewriteRule ^composer.json - [F]
</IfModule>

# deny access to hidden files and directories without mod_rewrite

# General setting to properly handle LimeSurvey paths
# AcceptPathInfo on

# XSS protection
<IfModule mod_headers.c>
    Header set X-XSS-Protection "1; mode=block"
    <FilesMatch "\.(svgz?)$">
        Header set Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; style-src 'self' 'unsafe-inline'"
    </FilesMatch>
</IfModule>

# Disable Multiviews (issue #16859)
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php7_module>
   php_flag display_errors On
   php_value max_execution_time 1800
   php_value max_input_time -1
   php_value max_input_vars 10000
   php_value memory_limit 2048M
   php_value post_max_size 2048M
   php_value session.gc_maxlifetime 43200
   php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
   php_value upload_max_filesize 2048M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors On
   php_value max_execution_time 1800
   php_value max_input_time -1
   php_value max_input_vars 10000
   php_value memory_limit 2048M
   php_value post_max_size 2048M
   php_value session.gc_maxlifetime 43200
   php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
   php_value upload_max_filesize 2048M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit
