Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This Apache config file was created by Duplicator Installer on 2019-10-16 04:58:20.
- #The original can be found in archived file with the name htaccess.orig
- # BEGIN WordPress
- php_value default_charset utf-8
- AddType 'text/html; charset=utf-8' .html .htm .shtml
- <IfModule mod_rewrite.c>
- RewriteEngine On
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule . index.php [L]
- RewriteCond %{HTTPS} off
- RewriteCond %{HTTP:X-Forwarded-Proto} !https
- RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- RewriteCond %{REQUEST_URI} ^\/$
- RewriteCond %{HTTP_HOST} ^www\.(.*)$
- RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
- RewriteCond %{REQUEST_URI} !\?
- RewriteCond %{REQUEST_URI} !\&
- RewriteCond %{REQUEST_URI} !\=
- RewriteCond %{REQUEST_URI} !\.
- RewriteCond %{REQUEST_URI} \/$
- RewriteCond %{HTTP_HOST} ^www\.(.*)$
- RewriteRule ^(.*)\/$ http://%1/$1 [L,R=301]
- RewriteCond %{REQUEST_URI} !\?
- RewriteCond %{REQUEST_URI} !\&
- RewriteCond %{REQUEST_URI} !\=
- RewriteCond %{REQUEST_URI} !\.
- RewriteCond %{REQUEST_URI} !\/$
- RewriteCond %{HTTP_HOST} ^www\.(.*)$
- RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
- RewriteCond %{REQUEST_URI} !\?
- RewriteCond %{REQUEST_URI} !\&
- RewriteCond %{REQUEST_URI} !\=
- RewriteCond %{REQUEST_URI} !\.
- RewriteCond %{REQUEST_URI} \/$
- RewriteCond %{HTTP_HOST} ^([^www].*)$
- RewriteRule ^(.*)\/$ http://%1/$1 [L,R=301]
- </IfModule>
- AddType text/css .css
- AddType text/xml .xml
- AddType application/octet-stream .doc .mov .avi .pdf .xls
- # ForceType application/x-httpd-php
- <ifModule mod_headers.c>
- #кэшировать html и htm файлы на один день
- <FilesMatch "\.(html|htm)$">
- Header set Cache-Control "max-age=43200"
- </FilesMatch>
- #кэшировать css, javascript и текстовые файлы на одну неделю
- <FilesMatch "\.(js|css|txt)$">
- Header set Cache-Control "max-age=604800"
- </FilesMatch>
- #кэшировать флэш и изображения на месяц
- <FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$">
- Header set Cache-Control "max-age=2592000"
- </FilesMatch>
- #отключить кэширование
- <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
- Header unset Cache-Control
- </FilesMatch>
- </IfModule>
- <ifModule mod_expires.c>
- ExpiresActive On
- #по умолчанию кеш в 5 секунд
- ExpiresDefault "access plus 5 seconds"
- #кэшировать флэш и изображения на месяц
- ExpiresByType image/x-icon "access plus 2592000 seconds"
- ExpiresByType image/jpeg "access plus 2592000 seconds"
- ExpiresByType image/png "access plus 2592000 seconds"
- ExpiresByType image/gif "access plus 2592000 seconds"
- ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
- #кэшировать css, javascript и текстовые файлы на одну неделю
- ExpiresByType text/css "access plus 604800 seconds"
- ExpiresByType text/javascript "access plus 604800 seconds"
- ExpiresByType application/javascript "access plus 604800 seconds"
- ExpiresByType application/x-javascript "access plus 604800 seconds"
- #кэшировать html и htm файлы на один день
- ExpiresByType text/html "access plus 43200 seconds"
- #кэшировать xml файлы на десять минут
- ExpiresByType application/xhtml+xml "access plus 600 seconds"
- </ifModule>
- <IfModule mod_deflate.c>
- AddOutputFilterByType DEFLATE application/javascript
- AddOutputFilterByType DEFLATE application/rss+xml
- AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
- AddOutputFilterByType DEFLATE application/x-font
- AddOutputFilterByType DEFLATE application/x-font-opentype
- AddOutputFilterByType DEFLATE application/x-font-otf
- AddOutputFilterByType DEFLATE application/x-font-truetype
- AddOutputFilterByType DEFLATE application/x-font-ttf
- AddOutputFilterByType DEFLATE application/x-javascript
- AddOutputFilterByType DEFLATE application/xhtml+xml
- AddOutputFilterByType DEFLATE application/xml
- AddOutputFilterByType DEFLATE font/opentype
- AddOutputFilterByType DEFLATE font/otf
- AddOutputFilterByType DEFLATE font/ttf
- AddOutputFilterByType DEFLATE image/svg+xml
- AddOutputFilterByType DEFLATE image/x-icon
- AddOutputFilterByType DEFLATE text/css
- AddOutputFilterByType DEFLATE text/html
- AddOutputFilterByType DEFLATE text/javascript
- AddOutputFilterByType DEFLATE text/plain
- AddOutputFilterByType DEFLATE text/xml
- BrowserMatch ^Mozilla/4 gzip-only-text/html
- BrowserMatch ^Mozilla/4\.0[678] no-gzip
- BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
- Header append Vary User-Agent
- </IfModule>
- <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 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>
- # END WordPress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement