README
changeset 28 46e23ce07981
parent 27 bf206815c2ab
child 30 5cc836e06759
--- a/README	Wed Nov 09 16:07:25 2011 -0800
+++ b/README	Wed Nov 09 16:40:38 2011 -0800
@@ -5,7 +5,7 @@
 What is volta?
 --------------
 
-Volta is a high performance, low resource URI rewriter for use with the
+Volta is a high-performance, low-resource URI rewriter for use with the
 Squid caching proxy server (http://www.squid-cache.org/.)  With it, you
 can dynamically alter URI requests that pass through Squid based on
 various criteria.
@@ -36,12 +36,12 @@
 
 You must enable url rewriting from within the squid.conf file.
 
-	url_rewrite_program /usr/local/bin/volta
+    url_rewrite_program /usr/local/bin/volta
 
 ... and that's it.  You may need some additional customization, like where
 the volta database is stored on disk:
 
-	url_rewrite_program /usr/local/bin/volta -f /var/db/squid/volta.db
+    url_rewrite_program /usr/local/bin/volta -f /var/db/squid/volta.db
 
 Busy servers:
 
@@ -50,8 +50,8 @@
 up.  A proxy at my $DAYJOB is in use by around 450 people, and we get by
 nicely with 10 volta children.
 
-	url_rewrite_concurrency 0
-	url_rewrite_children 10
+    url_rewrite_concurrency 0
+    url_rewrite_children 10
 
 
 Using volta
@@ -62,7 +62,7 @@
 Volta reads its rewrite rules from a local database.  You can create the
 rules in a text editor, then convert it to the database like so:
 
-	% volta -c rules.txt
+    % volta -c rules.txt
 
 You'll be left with a "volta.db" file in the current directory.  Put it
 wherever you please, and use the -f flag to point to it.
@@ -78,9 +78,9 @@
 
 When compiling the ruleset into the database format, volta detects
 malformed rules and stops if there are any problems, leaving your
-original database intact.  You can change the ruleset at any time while
-volta is running, and the new rules will take affect within about 10
-seconds.  No need to restart squid!
+original database intact. You can change the ruleset and recompile the
+database at any time while volta is running, and the new rules will take
+affect within about 10 seconds. No need to restart squid!
 
 There are two types of rules -- positive matches, and negative matches.
 Positive matches cause the rewrite, negative matches allow the original
@@ -102,38 +102,39 @@
 
     Second field: the path to match.
 
-	  This can be an exact match ('/path/to/something.html'), a regular
-	  expression ('\.(jpg|gif|png)$'), or a single '*' to match for any
-	  path. Regular expressions are matches without case sensitivity.  There
-	  is currently no support for capturing, though this may be added in
-	  a future release.
+      This can be an exact match ('/path/to/something.html'), a regular
+      expression ('\.(jpg|gif|png)$'), or a single '*' to match for any
+      path. Regular expressions are matches without case sensitivity. There
+      is currently no support for capturing, though this may be added in a
+      future release.
 
 
     Third field: The redirect code and url to rewrite to.
 
-      Any pieces of a url that are omitted are automatically replaced
-      with the original request's element -- the exception is a hostname,
-      which is required.  If you omit a redirect code, the URL rewrite is
-      transparent to the client.  You can attach a 301: or 302: prefix to
-      cause a permanent or temporary code to be respectively sent, instead.
+      Any pieces of a url that are omitted are automatically replaced with
+      the original request's element -- the exception is a hostname, which
+      is required. If you omit a redirect code, the URL rewrite is
+      transparent to the client. You can attach a 301: or 302: prefix to
+      cause a permanent or temporary (respectively) redirect response to be
+      sent, instead.
 
 
 ### Negative matches:
 
     First field: the hostname to match.
 
-	  See above -- all the same rules apply.
+      See above -- all the same rules apply.
 
 
     Second field: the path to match.
 
-	  See above -- all the same rules apply.
+      See above -- all the same rules apply.
 
 
-	Third field: the 'negative' marker.
+    Third field: the 'negative' marker.
 
-	  This is simply the '-' character, that signals to volta that this is
-	  a negative matching rule.
+      This is simply the '-' character, that signals to volta that this is
+      a negative matching rule.
 
 
 You can easily test your rules by running volta on the command line, and
@@ -147,29 +148,24 @@
 
     google.com * 302:https://www.google.com
 
-	This will redirect the request "http://www.google.com/search?q=test" to
-	"https://www.google.com/search?q=test".
+    This will redirect the request "http://www.google.com/search?q=test" to
+    "https://www.google.com/search?q=test".
 
 
 Transparently alter all uploaded images on imgur to be my face:  :)
 
-	i.imgur.com \.(gif|png|jpg)$ http://www.martini.nu/images/mahlon.jpg
+    i.imgur.com \.(gif|png|jpg)$ http://www.martini.nu/images/mahlon.jpg
 
 
 Expand a local, non qualified hostname to a FQDN (useful alongside the
 'dns_defnames' squid setting to enforce browser proxy behaviors):
 
-	local-example * local-example.company.com
+    local-example * local-example.company.com
 
 
 Cause all blog content except for 2011 posts to permanently redirect to
 an archival page:
 
-	martini.nu /blog/2011 -
-	martini.nu /blog 301:martini.nu/content-archived.html
-
+    martini.nu /blog/2011 -
+    martini.nu /blog 301:martini.nu/content-archived.html
 
-Turn off rewriting for specific network segment or IP address:
-
-	Squid has this ability built in -- see the 'url_rewrite_access' setting.
-