Created
November 17, 2019 15:25
-
-
Save nagiyevelchin/37ebba798dbf2ad94baed3408f6ad184 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Header set X-Robots-Tag "noindex, nofollow" | |
Header set X-Frame-Options SAMEORIGIN | |
Header set X-Content-Type-Options nosniff | |
Header set X-XSS-Protection "1; mode=block" | |
Header set X-Content-Security-Policy "allow 'self';" | |
Header set X-WebKit-CSP "allow 'self';" | |
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS | |
Header add Access-Control-Allow-Origin "*" | |
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type" | |
Header add Access-Control-Allow-Methods "GET, POST" | |
<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> | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/x-javascript | |
# ---------------------------------------------------------------------- | |
# Expires headers (for better cache control) | |
# ---------------------------------------------------------------------- | |
# | |
# These are pretty far-future expires headers | |
# They assume you control versioning with cachebusting query params like: | |
# <script src="application.js?20100608"> | |
# Additionally, consider that outdated proxies may miscache | |
# | |
# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/ | |
# | |
# If you don`t use filenames to version, lower the css and js to something like "access plus 1 week" | |
# | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
# Perhaps better to whitelist expires rules? Perhaps. | |
ExpiresDefault "access plus 1 month" | |
# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5) | |
ExpiresByType text/cache-manifest "access plus 0 seconds" | |
# Your document html | |
ExpiresByType text/html "access plus 0 seconds" | |
# Data | |
ExpiresByType text/xml "access plus 0 seconds" | |
ExpiresByType application/xml "access plus 0 seconds" | |
ExpiresByType application/json "access plus 0 seconds" | |
# RSS feed | |
ExpiresByType application/rss+xml "access plus 1 hour" | |
# Favicon (cannot be renamed) | |
ExpiresByType image/x-icon "access plus 1 week" | |
# Media: images, video, audio | |
ExpiresByType image/gif "access plus 1 month" | |
ExpiresByType image/png "access plus 1 month" | |
ExpiresByType image/jpg "access plus 1 month" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType video/ogg "access plus 1 month" | |
ExpiresByType audio/ogg "access plus 1 month" | |
ExpiresByType video/mp4 "access plus 1 month" | |
ExpiresByType video/webm "access plus 1 month" | |
# HTC files (css3pie) | |
ExpiresByType text/x-component "access plus 1 month" | |
# Webfonts | |
ExpiresByType font/truetype "access plus 1 month" | |
ExpiresByType font/opentype "access plus 1 month" | |
ExpiresByType application/x-font-woff "access plus 1 month" | |
ExpiresByType image/svg+xml "access plus 1 month" | |
ExpiresByType application/vnd.ms-fontobject "access plus 1 month" | |
# CSS and JavaScript | |
ExpiresByType text/css "access plus 1 year" | |
ExpiresByType application/javascript "access plus 1 year" | |
ExpiresByType text/javascript "access plus 1 year" | |
<IfModule mod_headers.c> | |
Header append Cache-Control "public" | |
</IfModule> | |
</IfModule> | |
DirectoryIndex index7555112.php | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^www\..*$ [NC] | |
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ | |
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] | |
RewriteCond %{HTTPS} !on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)/$ $1 [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule pics/([0-9]*)/([0-9]*)/(.*)$ pics.php?width=$1&height=$2&image=/uploads/$3 [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)/useruploads/(.*)$ useruploads/$2 [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)/js/(.*)$ js/$2 [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)/uploads/(.*)$ uploads/$2 [R,L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)/images/(.*)$ images/$2 [R,L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)/img/(.*)$ img/$2 [R,L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule admin123/elfinder/(.*)$ elfinder/$1 [R,L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule admin123(.*)$ admin7555112.php?$1&%{QUERY_STRING} [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index7555112.php?/$1 [QSA,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment