<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 2 days"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
</IfModule>

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On
    
    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>

<IfModule mod_headers.c>
 # Header set Access-Control-Allow-Origin "*"
 Header always unset X-Frame-Options
</IfModule>

<Files ".gitignore">
    Order Deny,Allow
    Deny from all
</Files>

<Files ".gitattributes">
    Order Deny,Allow
    Deny from all
</Files>

<Files "composer.json">
    Order Deny,Allow
    Deny from all
</Files>

<Files "package.json">
    Order Deny,Allow
    Deny from all
</Files>

<IfModule mod_headers.c>
    # Prevent click jacking Attack
    Header set X-Frame-Options: Deny
    Header set X-Frame-Options: SAMEORIGIN
</IfModule>

