diff --git a/config.ru b/config.ru
index bd83b25..6b1bb50 100644
--- a/config.ru
+++ b/config.ru
@@ -1,4 +1,6 @@
 # This file is used by Rack-based servers to start the application.

 require ::File.expand_path('../config/environment', __FILE__)
-run Rails.application
+map ENV['RAILS_RELATIVE_URL_ROOT'] || '/' do
+    run Rails.application
+end