You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
In a preload method inside a page, you can call this.redirect to redirect the page before it renders.
this.redirect(301,'some/url')
It would be advantageous (for instance, in the case of adding SEO mappings for legacy urls), if we could redirect to external urls (i.e. another website).
where the third parameter defines whether the url is absolute (true) or relative (false).
The text was updated successfully, but these errors were encountered:
antony
changed the title
Support redirecting to absolute URL from res.redirect on server
Support redirecting to absolute URL from this.redirect in preload
Oct 23, 2018
As discussed in the Sapper discord.
In a preload method inside a page, you can call this.redirect to redirect the page before it renders.
It would be advantageous (for instance, in the case of adding SEO mappings for legacy urls), if we could redirect to external urls (i.e. another website).
One possible way of doing this would be:
where the third parameter defines whether the url is absolute (true) or relative (false).
The text was updated successfully, but these errors were encountered: