diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index ee34bd7bd..91e5f3669 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -20,12 +20,10 @@ class MainController < ApplicationController uid_logger("main start is #{cookies[:_educoder_session]}") end Rails.logger("params paths is #{params[:path]}") - if params[:path].include("h5") - path = params[:path].split("/").second - if path == "h5" - render file: 'public/h5build/index.html', :layout => false - end + if params[:path].split("/").first == "h5" + render file: 'public/h5build/index.html', :layout => false + else + render file: 'public/react/build/index.html', :layout => false end - render file: 'public/react/build/index.html', :layout => false end end \ No newline at end of file