ErrorDocument 404 /errors/404.html RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.alaska.maintenanceservice\.org [NC] RewriteRule (.*) https://alaska.maintenanceservice.org/$1 [R=301,L] RewriteEngine on RewriteEngine On RewriteRule ^sitemap\.xml/?$ sitemap.php ############### حماية ملفات الموقع من التحميل ############### #fix www to non www redirect and http to https errors #fix Accesible Index Page error DirectoryIndex index.php AddCharset UTF-8 .txt AddCharset UTF-8 .php AddCharset UTF-8 .html AddCharset UTF-8 .utf8 # Create the ETag (entity tag) response header field FileETag MTime Size AddType application/javascript js AddType application/vnd.ms-fontobject eot AddType application/x-font-ttf ttf ttc AddType application/x-font-woff woff AddType font/opentype otf AddType image/svg+xml svg svgz AddHandler x-httpd-php .html Header append Vary: Accept-Encoding Header unset Last-Modified AddEncoding gzip svgz # ----------------------------------------------------------------------- # Compressing output. # ----------------------------------------------------------------------- php_value zlib.output_compression 16386 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.* # Remove browser bugs (only needed for really old browsers) 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 ################Expires and Cache-Control ########## ## EXPIRES HEADER CACHING ## ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType application/javascript "access 1 month" ExpiresByType application/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 7 days" ## EXPIRES HEADER CACHING ## Header append X-FRAME-OPTIONS "DENY" Header set X-Frame-Options "DENY" Header unset X-Frame-Options ################Turn off ETags ############### Header unset ETag Header set Strict-Transport-Security "max-age=10886400; includeSubDomains; preload" env=HTTPS FileETag None Header unset ETag FileETag None ################Remove Last-Modified header ############### ################Remove Last-Modified header ############### Header unset Last-Modified AddType text/css .css AddType application/x-javascript .js AddType image/bmp .bmp AddType image/gif .gif AddType application/x-gzip .gz .gzip AddType image/x-icon .ico AddType image/jpeg .jpg .jpeg .jpe AddType image/png .png AddType application/x-font-ttf .ttf .ttc AddType application/zip .zip ExpiresActive On ExpiresByType text/css A31536000 ExpiresByType application/x-javascript A31536000 ExpiresByType application/javascript A31536000 ExpiresByType text/javascript A31536000 ExpiresByType text/x-js A31536000 ExpiresByType image/bmp A31536000 ExpiresByType image/gif A31536000 ExpiresByType application/x-gzip A31536000 ExpiresByType image/x-icon A31536000 ExpiresByType image/jpeg A31536000 ExpiresByType application/x-font-otf A31536000 ExpiresByType image/png A31536000 ExpiresByType application/x-font-ttf A31536000 ExpiresByType application/zip A31536000 Header append Vary User-Agent env=!dont-vary AddOutputFilterByType DEFLATE text/html text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/plain image/x-icon image/png image/gif # DEFLATE by extension AddOutputFilter DEFLATE js css htm html xml png gif Header unset Set-Cookie Header set Cache-Control "max-age=31536000, public"