本文介绍了如何在表单GET方法中创建自定义URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的html页面中有一个表单,如下所示
I have a form in my html page, as below
<form method="get" action="example.php" name="find">
<input type="text" name="productname" />
<input type="submit" value="find product" name="getproduct" />
</form>
当我按下提交按钮时,它会将类似URL的内容发送到example.php页面
When I press the submit button it sends such like URL to example.php page
http://www.example.com/example.php?productname=product
我想获得如下网址
I want to get this URL as below
http://www.example.com/example/product
注意:我需要这种URL,因为我需要使用.htaccess重写URL.
请指导我,我该怎么做.
Note: I want this kind of URL because I need to Rewrite the URL using .htaccess.
Please guide me, how can i do that.
推荐答案
这篇关于如何在表单GET方法中创建自定义URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!