Issue
I'm looking to redirect the user to another page after successfully signing in or signing up in HTML and Firebase.
I have login.html
and signup.html
as well as home.html
inside the home folder.
After successfully signing in or signing up, I need to redirect the user to home.html
as well as prevent the user from returning to login.html
or signup.html
.
Solution
Redirect with JavaScript:
window.location = 'mysite';
Redirect in HTML's <input>
element:
<input type="submit" target="mysite" value="Sign in"/>
Redirect in HTML's <meta>
element:
<meta http-equiv="refresh" content="time; URL=new_url" />
Redirect in PHP:
<?php
header('Location: mysite');
exit;
?>
Redirect in Firebase:
"hosting":{
"/bar""for requests to""/foo""(but not""/foo/**"")""redirects":[
{
"source":"/foo",
"destination":"/bar",
"type":301
}
]
}
Answered By - Javad Shariati
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.