Rails.application.routes.draw do
  
  namespace :panel do
    namespace :page_content do
      namespace :back_end do
        root :to => "page_contexts#index"
        resources :page_contexts
        match "view/:page_id" => "page_contexts#view" ,:as => :view
      end
      namespace :front_end do
        root :to => "page_contexts#index"
        resources :page_contexts
        match "page_contexts/:page_id" => "page_contexts#index"
      end
    end
  end
 match "/appfront/*path" => redirect("/panel/*path")
end