Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # RULES
- Order Allow,Deny
- Allow from all
- # ERRORS
- ErrorDocument 400 http://твой сайт/
- ErrorDocument 402 http://твой сайт/
- ErrorDocument 403 http://твой сайт/
- ErrorDocument 404 http://твой сайт/
- # OPTIONS
- Options -Indexes
- # REWRITE MOD
- RewriteEngine on
- # URL
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-l
- RewriteCond %{REQUEST_URI} !index.php
- RewriteCond %{REQUEST_URI} !\.[^./]+$
- RewriteCond %{REQUEST_URI} !(.*)/$
- RewriteRule ^(.*)$ index.php?EX=$1 [L,QSA]
- RewriteRule ^(.*)/$ index.php?EX=$1 [L,QSA]
- # REQUEST LIMIT
- LimitRequestBody 2000000
- # mod_deflate
- <IfModule mod_deflate.c>
- <FilesMatch ".(ico|css|js|x?html?|php|xml)$">
- SetOutputFilter DEFLATE
- </FilesMatch>
- </IfModule>
- # mod_gzip
- <ifModule mod_gzip.c>
- mod_gzip_on Yes
- mod_gzip_dechunk Yes
- mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
- 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>
- # mod_expires
- <ifModule mod_expires.c>
- ExpiresActive On
- ExpiresDefault A0
- # 1 YEAR - doesn't change often
- <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
- ExpiresDefault A29030400
- </FilesMatch>
- # 1 WEEK - possible to be changed, unlikely
- <FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
- ExpiresDefault A604800
- </FilesMatch>
- # 3 HOUR - core content, changes quickly
- <FilesMatch "\.(txt|xml|js|css)$">
- ExpiresDefault A10800
- </FilesMatch>
- </ifModule>
- # mod_headers
- <ifModule mod_headers.c>
- <filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|swf|bmp)$">
- Header set Cache-Control "max-age=604800, public"
- </filesMatch>
- <filesMatch ".(css|js)$">
- Header set Cache-Control "max-age=604800, public"
- </filesMatch>
- <filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
- Header unset ETag
- FileETag None
- </filesMatch>
- </ifModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement