如何提交表單方法get
與mod_rewrite
網址是什麼?如何使用mod_rewrite url提交表單方法get?
這是我的代碼
<form method="GET" action="https://www.example.com/search/">
<input type="text" name="search" value="" placeholder="search">
<input type="submit" value="OK">
</form>
當我提交表單。這是將被重定向到
https://www.example.com/search/?search=test
我如何能將我的代碼重定向到
https://www.example.com/search/test/1
提交表格後?
_method 1_:使用'POST',而不是'GET'; _Method 2_:使用javascript/jquery提交表單,在那裏你可以從表單元素構建你的url – Thamilan