Add requested path to www redirect
This commit is contained in:
parent
32370ce76c
commit
9a3de4e2d5
|
@ -3,9 +3,8 @@
|
||||||
require 'sinatra'
|
require 'sinatra'
|
||||||
|
|
||||||
before do
|
before do
|
||||||
unless settings.development? || request.host =~ /^www\./
|
redirect("https://www.#{request.host + request.path_info}") \
|
||||||
redirect("https://www.#{request.host}/")
|
unless settings.development? || request.host =~ /^www\./
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/*' do
|
get '/*' do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user