relative_url_root()
public
Returns the path
minus the web server relative installation directory. This method returns
nil unless the web server is apache.
# File actionpack/lib/action_controller/request.rb, line 171
def relative_url_root
@@relative_url_root ||= server_software == 'apache' ? env["SCRIPT_NAME"].to_s.sub(/\/dispatch\.(fcgi|rb|cgi)$/, '') : ''
end