From aa7bf3b7211cea99ce9312241526f4ec10b4e02b Mon Sep 17 00:00:00 2001 From: An Phan Date: Tue, 24 Feb 2015 17:10:19 +0800 Subject: [PATCH] Reworded a bit --- README.md | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index b5d96da..882858e 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,7 @@ What we are doing here is mostly collecting useful snippets from all over the in - [Compress Text Files](#compress-text-files) - [Set Expires Headers](#set-expires-headers) - [Turn eTags Off](#turn-etags-off) - - [Enable gzip Compression for All Files Except Images](#enable-gzip-compression-for-all-files-except-images) - [Disable gzip Compression](#disable-gzip-compression) - - [One Day Caching](#one-day-caching) - [Miscellaneous](#miscellaneous) - [Set PHP Variables](#set-php-variables) - [Custom Error Pages](#custom-error-pages) @@ -289,7 +287,7 @@ Require valid-user ``` ### Block Visitors by Referrer -This denies access for all users whom are referred by a specific domain. +This denies access for all users who are coming from (referred by) a specific domain. [Source](http://www.htaccess-guide.com/deny-visitors-by-referrer/) ``` apacheconf RewriteEngine on @@ -300,10 +298,9 @@ RewriteRule .* - [F] ``` ### Prevent Framing the Site -This prevents the website to be framed (i.e. into an iframe tag). However, it allows framing for a specific folder. +This prevents the website to be framed (i.e. put into an `iframe` tag), when still allows framing for a specific URI. ``` apacheconf -# prevent framing the site (except for myfolder) -SetEnvIf Request_URI "/myfolder" allow_framing=true +SetEnvIf Request_URI "/starry-night" allow_framing=true Header set X-Frame-Options SAMEORIGIN env=!allow_framing ``` @@ -414,25 +411,6 @@ By removing the ETag header, you disable caches and browsers from being able to FileETag None ``` -### Enable gzip Compression for All Files Except Images -This enables gzip compression for all files in the folder except for the images. Images are already compressed and re-compressing them is just waste of resources. -``` apacheconf -SetOutputFilter DEFLATE -SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|bmp|tiff)$ no-gzip dont-vary -``` - -### Disable gzip Compression -This disables gzip compression for the folder. -``` apacheconf -SetEnv no-gzip -``` - -### One Day Caching -Allows the contents of the folder to be cached for one day. This can be adjusted to any different number of seconds. -``` apacheconf -Header set Cache-Control "max-age=86400, public" -``` - ## Miscellaneous ### Set PHP Variables