author | Mahlon E. Smith <mahlon@martini.nu> |
Fri, 04 May 2012 08:33:21 -0700 | |
changeset 22 | 822094314703 |
child 33 | ba41bfbe87a2 |
permissions | -rw-r--r-- |
22
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
1 |
|
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
2 |
#------------------------------------------------------------------------------ |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
3 |
# This is an example volta rules file. In order for volta to use it, |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
4 |
# it needs to be converted to a database for fast lookup. See the |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
5 |
# README file, distributed with volta, for instructions. |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
6 |
#------------------------------------------------------------------------------ |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
7 |
|
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
8 |
# Force all requests to Google to use SSL |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
9 |
# http://www.google.com/search?q=test --> https://www.google.com/search?q=test |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
10 |
google.com * 302:https://www.google.com |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
11 |
|
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
12 |
# Transparently alter all uploaded images on imgur to be my face: :) |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
13 |
i.imgur.com \.(gif|png|jpg)$ http://www.martini.nu/images/mahlon.jpg |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
14 |
|
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
15 |
# Expand a local, non qualified hostname to a FQDN (useful alongside the |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
16 |
# 'dns_defnames' squid setting to enforce browser proxy behaviors): |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
17 |
local-example * local-example.company.com |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
18 |
|
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
19 |
# Cause all blog content except for 2011 posts to permanently redirect to |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
20 |
# an archival page. |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
21 |
martini.nu /blog/2011 - |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
22 |
martini.nu /blog 301:martini.nu/content-archived.html |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
23 |
|
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
24 |
# Send all requests to reddit/r/WTF/* through a lua script for |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
25 |
# further processing. |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
26 |
reddit.com /r/wtf lua:examples/lua-example.lua |
822094314703
Add the ability to optionally script rewrite logic using Lua.
Mahlon E. Smith <mahlon@martini.nu>
parents:
diff
changeset
|
27 |