简体   繁体   English

在 url 中传递变量而不使用 $_GET 方法

[英]passing variables in url without using $_GET method

i want send my variables like this:我想像这样发送我的变量:

ExampleSite/var1/var2/var3/...

instead of this:而不是这个:

ExampleSite/?ex1=var1&ex2=var2&ex3=var3&...

You're question is poorly constructed, but I guess you need the apache RewriteEngine , ie:你的问题结构很差,但我想你需要 apache RewriteEngine ,即:

Create a file named .htaccess on the root of your website and add the following content:在您网站的根目录上创建一个名为.htaccess的文件并添加以下内容:

RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /some_page?ex1=$1&ex2=$2&ex3=$3 [L]

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

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