Project

General

Profile

1
#!/usr/bin/env ruby
2

    
3
require File.dirname(__FILE__) + '/../config/boot'
4
require File.dirname(__FILE__) + '/../config/environment'
5

    
6
class Rack::PathInfoRewriter
7
  def initialize(app)
8
    @app = app
9
  end
10

    
11
  def call(env)
12
    env.delete('SCRIPT_NAME')
13
    parts = env['REQUEST_URI'].split('?')
14
    env['PATH_INFO'] = parts[0]
15
    env['QUERY_STRING'] = parts[1].to_s
16
    @app.call(env)
17
  end
18
end
19

    
20
Rack::Handler::FastCGI.run Rack::PathInfoRewriter.new(RedmineApp::Application)
(3-3/5)