| server_redirect | R Documentation |
Do a server side redirection
server_redirect(to, session = shiny::getDefaultReactiveDomain())
to |
the destination of the redirection: a path ( |
session |
shiny session object, default is |
Used for side effect
redirect() to answer an url with an HTTP redirection instead.
library(shiny)
# `server_redirect()` is called from a page server, so it needs a session:
page(
href = "/login",
ui = tagList(actionButton("go", "Take me home")),
server = function(input, output, session) {
observeEvent(input$go, {
server_redirect("/")
})
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.