diff --git a/copyvio.fcgi b/copyvio.fcgi new file mode 100755 index 0000000..6367471 --- /dev/null +++ b/copyvio.fcgi @@ -0,0 +1,9 @@ +#! /usr/bin/env python + +def myapp(environ, start_response): + start_response('200 OK', [('Content-Type', 'text/plain')]) + return ['Hello World!\n'] + +if __name__ == "__main__": + from flup.server.fcgi import WSGIServer + WSGIServer(myapp).run() diff --git a/rewrite.script b/rewrite.script new file mode 100644 index 0000000..d5de923 --- /dev/null +++ b/rewrite.script @@ -0,0 +1,5 @@ +match URL into $ with ^/~earwig/copyvio(\?.*?)?$ +if matched then + set URL = /~earwig/rewrite/copyvio.fcgi$1 + goto END +endif