You can probably get this by extracting the first part of your path by defining this in your controller:
def context_path(url)
URI.join('/' + request.fullpath.split('/')[1], url)
end
helper_method :context_path
Then that's easy to incorporate into your URL:
<%= link_to "My Link", context_path('three/four') %>