# Disallow requests for the config.ini.php file, although it's already protected.
# Requires AllowOverride Limit
<Files config.ini.php>
    Order deny,allow
    Deny from all
</Files>

# Requires AllowOverride Options
php_flag register_globals Off
php_flag magic_quotes_gpc Off
php_flag mysql.trace_mode Off
# Allow to select many genes for the gene panel. 15000 allows for some 3000 genes to be processed.
php_value max_input_vars 15000
php_value suhosin.post.max_vars 15000
php_value suhosin.request.max_vars 15000

# We rely on MultiViews or the RewriteEngine. We can't check on MultiViews here,
# nor can we cleanly try to enable it here without the need for AllowOverride All.
# If you do not want to use the RewriteEngine, make sure "MultiViews" is enabled
# *explicitly* in the Apache configuration, and remove the code below.
# Requires AllowOverride FileInfo
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^analyses(.*)$ analyses.php
    RewriteRule ^announcements(.*)$ announcements.php
    RewriteRule ^api(.*)$ api.php
    RewriteRule ^attachments(.*)$ attachments.php
    RewriteRule ^check_update(.*)$ check_update.php
    RewriteRule ^columns(.*)$ columns.php
    RewriteRule ^configuration(.*)$ configuration.php
    RewriteRule ^diseases(.*)$ diseases.php
    RewriteRule ^download(.*)$ download.php
    RewriteRule ^genes(.*)$ genes.php
    RewriteRule ^gene_statistics(.*)$ gene_statistics.php
    RewriteRule ^gene_panels(.*)$ gene_panels.php
    RewriteRule ^import(.*)$ import.php
#    RewriteRule ^install(.*)$ install/index.php # I'm having trouble using /install?etc because Apache is redirecting to /install/?etc which loses the $_POST info. Very annoying.
    RewriteRule ^individuals(.*)$ individuals.php
    RewriteRule ^links(.*)$ links.php
    RewriteRule ^login(.*)$ login.php
    RewriteRule ^logout(.*)$ logout.php
    RewriteRule ^logs(.*)$ logs.php
    RewriteRule ^pedigree(.*)$ pedigree.php
    RewriteRule ^phenotypes(.*)$ phenotypes.php
    RewriteRule ^references(.*)$ references.php
    RewriteRule ^reset_password(.*)$ reset_password.php
    RewriteRule ^screenings(.*)$ screenings.php
    RewriteRule ^settings(.*)$ settings.php
    RewriteRule ^setup(.*)$ setup.php
    RewriteRule ^status(.*)$ status.php
    RewriteRule ^submit(.*)$ submit.php
    RewriteRule ^summary_annotations(.*)$ summary_annotations.php
    RewriteRule ^transcripts(.*)$ transcripts.php
    RewriteRule ^uninstall(.*)$ uninstall.php
    RewriteRule ^users(.*)$ users.php
    RewriteRule ^variants(.*)$ variants.php
    RewriteRule ^view(.*)$ view.php
</IfModule>
