dsm13698679318 2013-09-20 09:48
浏览 64

在重定向到php页面时隐藏jsp中的参数

I have a jsp page with a redirect button/link. I need to redirect to a PHP page along with parameters. Now, I need to hide the parameters from the address bar. How is it possible?

For Example:

http://jspsite.com/a.jsp

I need redirect to b.php as:

http://phpsite.com/b.php?user=1234

How can I hide this parameter "user" from the link?

Please help

  • 写回答

2条回答 默认 最新

  • dqz13288 2013-09-20 09:51
    关注

    If it is a form then you can use POST method, like,

    <form action="b.php" method="POST">
       <input type="text" value="1234" name="user">
       <input type="submit" value="Submit" />
    </form>
    

    In b.php Page use the variable like,

    echo $_REQUEST['user'];
    

    Otherwise use htaccess like,

    RewriteRule ^user=[0-9] user/$1 [L,QSA]
    
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据