# Disable directory listings
Options -Indexes

# Disable Server signature
ServerSignature Off

# add mime type
AddType text/javascript .mjs

# Prevent direct access to files starting with a dot
#<FilesMatch "^\.">
#    Order allow,deny
#    Deny from all
#</FilesMatch>

# Prevent direct access to specific file extensions
<FilesMatch "\.(xml|config|log|lock|config|yml)$">
    Order allow,deny
    Deny from all
</FilesMatch>

# Prevent access to composer.json
<Files "composer*">
    Order allow,deny
    Deny from all
</Files>



# Prevent direct access to files starting with "srm_"
<FilesMatch "^srm_install">
    Order allow,deny
    Deny from all
</FilesMatch>

<FilesMatch "^srm_modules">
    Order allow,deny
    Deny from all
</FilesMatch>

<FilesMatch "^srm_storage">
    Order allow,deny
    Deny from all
</FilesMatch>

# Prevent direct access to files named "artisan" or containing the word "artisan"
<FilesMatch "(^|/)artisan|artisan/">
    Order allow,deny
    Deny from all
</FilesMatch>

<IfModule mod_rewrite.c>
    RewriteEngine on

    # Any request to srm folder redirect it to dashboard.
    RewriteRule ^$ %{REQUEST_URI}/dashboard [L,R=301]

</IfModule>

