使用java和html基于当前用户创建重定向链接

Create redirect link based on current user using java & html

本文关键字:用户 创建 重定向 链接 于当前 java html 使用      更新时间:2023-09-26

基于谷歌帐户的身份验证。

如何根据当前用户创建重定向链接。
例如:我的网站:www.test.com/home

  • 如果用户 A 登录,当他/她按我的页面时,它应该转到www.test.com/User A
  • 如果用户 B 登录,当他/她按我的页面时,它应该转到www.test.com/user B

注意:我的应用程序不支持 PHP

<?php
$user=$_POST['user'];
Header("Location: www.test.com/".$user);
exit;
?>

这是基于 var $user 的简单重定向:

Header("Location: http://mypage.com/".$user);