Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #web saya nolbesar.com dibuat pakai html,css,javascript,dan boostrap hosting di niagahoster
- <IfModule mod_headers.c>
- Header set X-UA-Compatible "IE=Edge,chrome=1"
- # mod_headers can't match by content-type, but we don't want to send this header on *everything*...
- <FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|xpi|safariextz|vcf)$" >
- Header unset X-UA-Compatible
- </FilesMatch>
- </IfModule>
- <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
- <IfModule mod_headers.c>
- Header set Access-Control-Allow-Origin "*"
- </IfModule>
- </FilesMatch>
- <IfModule mod_deflate.c>
- # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
- <IfModule mod_setenvif.c>
- <IfModule mod_headers.c>
- SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
- RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
- </IfModule>
- </IfModule>
- # HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
- <IfModule filter_module>
- FilterDeclare COMPRESS
- FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
- FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
- FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
- FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
- FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
- FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
- FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
- FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
- FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
- FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
- FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
- FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
- FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
- FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
- FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
- FilterChain COMPRESS
- FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
- </IfModule>
- <IfModule !mod_filter.c>
- # Legacy versions of Apache
- AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
- AddOutputFilterByType DEFLATE application/javascript
- AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
- AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
- AddOutputFilterByType DEFLATE image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
- </IfModule>
- </IfModule>
- # Block access to "hidden" directories whose names begin with a period. This
- # includes directories used by version control systems such as Subversion or Git.
- <IfModule mod_rewrite.c>
- RewriteRule "(^|/)\." - [F]
- </IfModule>
- # Use UTF-8 encoding for anything served text/plain or text/html
- AddDefaultCharset utf-8
- #expired
- <IfModule mod_expires.c>
- ExpiresActive on
- ExpiresDefault "access plus 1 month"
- ExpiresByType text/html "access plus 0 seconds"
- ExpiresByType text/xml "access plus 0 seconds"
- ExpiresByType application/xml "access plus 0 seconds"
- ExpiresByType application/json "access plus 0 seconds"
- ExpiresByType image/x-icon "access plus 1 week"
- ExpiresByType text/css "access plus 1 year"
- ExpiresByType application/javascript "access plus 1 year"
- <IfModule mod_headers.c>
- Header append Cache-Control "public"
- </IfModule>
- </IfModule>
- # Rewrite "www.example.com -> example.com"
- <IfModule mod_rewrite.c>
- RewriteCond %{HTTPS} !=on
- RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
- RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
- </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement