Closed peric closed 8 years ago
Presence of @base_url (by default, it is '') is not something that should rewrite crawled @url.
@base_url
''
@url
But, if @base_url is available, then we first need to do join_no_fragment with it, and afterwards also with @url.
join_no_fragment
In that case, when we have, for example:
@url = https://www.github.com @base_url = /assets link = image/awesome_image.png
The result (after UriHelper.join_no_fragment(@url, UriHelper.join_no_fragment(@base_url, link))) will be:
UriHelper.join_no_fragment(@url, UriHelper.join_no_fragment(@base_url, link))
link = 'https://www.github.com/assets/awesome_image.png
Interesting, had always though the base href should be absolute, but relatives are also allowed too.
thanks, Stewart.
Presence of
@base_url
(by default, it is''
) is not something that should rewrite crawled@url
.But, if
@base_url
is available, then we first need to dojoin_no_fragment
with it, and afterwards also with@url
.In that case, when we have, for example:
The result (after
UriHelper.join_no_fragment(@url, UriHelper.join_no_fragment(@base_url, link))
) will be:link = 'https://www.github.com/assets/awesome_image.png