Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (12 sloc) 361 Bytes
require 'rack-rewrite'
use Rack::Rewrite do
send_file %r{([^\?]+)}, Dir.getwd + '$1', :if => Proc.new { |env|
path = File.expand_path(Dir.getwd + env['PATH_INFO'])
File.file?(path)
}
rewrite %r{(.*)}, 'index.php?action=$1'
end
require 'rack-legacy'
use Rack::Legacy::Php, Dir.getwd
use Rack::Legacy::Cgi, Dir.getwd
run Rack::File.new Dir.getwd