Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RewriteEngine On
- RewriteRule . /public/index.php [L]
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_FILENAME} !-f
- #Disable index view
- options -Indexes
- #hide a Specifuc File
- <Files .env>
- order allow,deny
- Deny from all
- </Files>
- <Files .env.example>
- order allow,deny
- Deny from all
- </Files>
- <Files _ide_helper.php>
- order allow,deny
- Deny from all
- </Files>
- <IfModule mod_rewrite.c>
- <IfModule mod_negotiation.c>
- Options -MultiViews -Indexes
- </IfModule>
- RewriteEngine On
- # Handle Authorization Header
- RewriteCond %{HTTP:Authorization} .
- RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
- # Redirect Trailing Slashes If Not A Folder...
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_URI} (.+)/$
- RewriteRule ^ %1 [L,R=301]
- # Send Requests To Front Controller...
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^ index.php [L]
- </IfModule>
- <IfModule mod_expires.c>
- ## Enable expiration control
- ExpiresActive On
- ## CSS and JS expiration: 1 week after request
- ExpiresByType text/css "now plus 1 week"
- ExpiresByType application/javascript "now plus 1 week"
- ExpiresByType application/x-javascript "now plus 1 week"
- ## Image files expiration: 1 month after request
- ExpiresByType image/bmp "now plus 1 month"
- ExpiresByType image/gif "now plus 1 month"
- ExpiresByType image/jpeg "now plus 1 month"
- ExpiresByType image/jp2 "now plus 1 month"
- ExpiresByType image/pipeg "now plus 1 month"
- ExpiresByType image/png "now plus 1 month"
- ExpiresByType image/svg+xml "now plus 1 month"
- ExpiresByType image/tiff "now plus 1 month"
- ExpiresByType image/x-icon "now plus 1 month"
- ExpiresByType image/ico "now plus 1 month"
- ExpiresByType image/icon "now plus 1 month"
- ExpiresByType text/ico "now plus 1 month"
- ExpiresByType application/ico "now plus 1 month"
- ExpiresByType image/vnd.wap.wbmp "now plus 1 month"
- ## Font files expiration: 1 week after request
- ExpiresByType application/x-font-ttf "now plus 1 week"
- ExpiresByType application/x-font-opentype "now plus 1 week"
- ExpiresByType application/x-font-woff "now plus 1 week"
- ExpiresByType font/woff2 "now plus 1 week"
- ExpiresByType image/svg+xml "now plus 1 week"
- ## Audio files expiration: 1 month after request
- ExpiresByType audio/ogg "now plus 1 month"
- ExpiresByType application/ogg "now plus 1 month"
- ExpiresByType audio/basic "now plus 1 month"
- ExpiresByType audio/mid "now plus 1 month"
- ExpiresByType audio/midi "now plus 1 month"
- ExpiresByType audio/mpeg "now plus 1 month"
- ExpiresByType audio/mp3 "now plus 1 month"
- ExpiresByType audio/x-aiff "now plus 1 month"
- ExpiresByType audio/x-mpegurl "now plus 1 month"
- ExpiresByType audio/x-pn-realaudio "now plus 1 month"
- ExpiresByType audio/x-wav "now plus 1 month"
- ## Movie files expiration: 1 month after request
- ExpiresByType application/x-shockwave-flash "now plus 1 month"
- ExpiresByType x-world/x-vrml "now plus 1 month"
- ExpiresByType video/x-msvideo "now plus 1 month"
- ExpiresByType video/mpeg "now plus 1 month"
- ExpiresByType video/mp4 "now plus 1 month"
- ExpiresByType video/quicktime "now plus 1 month"
- ExpiresByType video/x-la-asf "now plus 1 month"
- ExpiresByType video/x-ms-asf "now plus 1 month"
- </IfModule>
- <ifModule mod_gzip.c>
- mod_gzip_on Yes
- mod_gzip_dechunk Yes
- mod_gzip_item_include file .(html?|txt|css|js|php)$
- mod_gzip_item_include handler ^cgi-script$
- mod_gzip_item_include mime ^text/.*
- mod_gzip_item_include mime ^application/x-javascript.*
- mod_gzip_item_exclude mime ^image/.*
- mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
- </ifModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement