parent
0e5e16c8b4
commit
7f7ed896cf
@ -163,7 +163,7 @@ module Locomotive
|
||||
end
|
||||
|
||||
def absolute_url(url)
|
||||
url.starts_with('/') ? url : "/#{url}"
|
||||
url.starts_with?('/') ? url : "/#{url}"
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -9,7 +9,7 @@ module Locomotive
|
||||
def call(env)
|
||||
path = env['PATH_INFO']
|
||||
|
||||
if !path.starts_with('/admin/') && (match = path.match(%r{(.+)/$}))
|
||||
if !path.starts_with?('/admin/') && (match = path.match(%r{(.+)/$}))
|
||||
response = Rack::Response.new
|
||||
response.redirect(match[1], 301) # moved permanently
|
||||
response.finish
|
||||
|
Loading…
Reference in New Issue
Block a user