简体   繁体   English

如何隐藏从网址获取数据

[英]How to hide Get data from Url

I want to hide get variables from url.now my url showing like this http://www.example.com/supplier/dashbord.php?name=MyRest 我想从url隐藏获取变量。现在我的url显示如下http://www.example.com/supplier/dashbord.php?name=MyRest

i want to show url something like http://www.example.com/supplier/dashbord.php 我想显示网址,例如http://www.example.com/supplier/dashbord.php

also i tried .htacces file 我也尝试过.htacces文件

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /supplier/

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^supplier/(.*) dashbord.php?name=$1
</IfModule>

but it's did't work.is there any solution for me? 但这没有用。我有解决方案吗?

GET parameters are always passed with the url. GET参数始终与URL一起传递。

What you actually want are POST parameters, they are transmitted within the http-body rather than the url and therefore invisible for the average user. 您真正想要的是POST参数,它们在http正文而不是url中传输,因此对于普通用户是不可见的。

In php, you access them by $_POST['var'] instead of $_GET['var'] , and in an HTML-form, you simply use method="POST" instead of method="GET" to transmit form data within the http body. 在php中,您可以通过$_POST['var']而不是$_GET['var'] $_POST['var']来访问它们,而在HTML表单中,您只需使用method="POST"而不是method="GET"来传输表单数据在http正文中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM