mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-15 20:34:44 +00:00
redirect to external URLs - closes #490
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<h1>root</h1>
|
||||
|
||||
<a href="redirect-from">redirect from</a>
|
||||
<a href="redirect-to-root">redirect to root</a>
|
||||
<a href="redirect-to-root">redirect to root</a>
|
||||
<a href="redirect-to-external">redirect to external</a>
|
||||
9
test/apps/redirects/src/routes/redirect-to-external.html
Normal file
9
test/apps/redirects/src/routes/redirect-to-external.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<h1>unredirected</h1>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
preload() {
|
||||
this.redirect(301, 'https://example.com');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user