diff --git a/v5.rb b/v5.rb index b3c64bd..aef9425 100644 --- a/v5.rb +++ b/v5.rb @@ -13,6 +13,10 @@ get '/media' do erb :folderpage end +get '/media/' do + erb :folderpage +end + get '/media/*' do erb :blogpage end @@ -21,6 +25,10 @@ get '/technology' do erb :folderpage end +get '/technology/' do + erb :folderpage +end + get '/technology/*' do erb :blogpage end @@ -29,6 +37,10 @@ get '/news' do erb :folderpage end +get '/news/' do + erb :folderpage +end + get '/news/*' do erb :blogpage end @@ -43,4 +55,9 @@ end get '/contact' do erb :contactpage +end + +not_found do + status 404 + erb :oops end \ No newline at end of file diff --git a/views/folderpage.erb b/views/folderpage.erb index 6522872..5285248 100644 --- a/views/folderpage.erb +++ b/views/folderpage.erb @@ -1,6 +1,6 @@ -<% title = request.path_info[1..-1].capitalize %> +<% title = request.path_info[1..-1].capitalize.gsub(/\/$/, "") %>