【发布时间】:2012-07-14 16:14:31
【问题描述】:
我有一个带有 3 个参数的表单的网页,例如
http://www.likeforex.com/currency-converter/fxconverter.php?f=euro-eur&t=usd-us-dollar&amt=1
我使用 .htaccess 将页面重写为:f_t.htm/amt 为:
http://www.likeforex.com/currency-converter/euro-eur_usd-us-dollar.htm/1
但是,我的问题是当用户更改amt(页面中间)的值时,表单被重新提交,重新提交的页面仍然是参数格式。 url如何改写成后格式?
提交按钮有什么问题,还是其他什么问题?
the form:
<form name="e" method="get" action="fxconverter.php">
the amt parameter:
<input type="text" id="amt" name="amt" size="16" maxlength="16" value="'.$amt.'" onclick="this.focus();this.select();" />'
the submit button:
<input type="submit" value="Convert" class="bt" />
the .htaccess line:
RewriteRule ^(.*)_([^_]+)\.htm/([^/]+)$ fxconverter.php?f=$1&t=$2&amt=$3 [NC]
非常感谢。
【问题讨论】:
-
能不能给我们看一下表格和相关的mod_rewrite,不然就是猜谜游戏了……
-
没什么。只有 RewriteRule ^(.*)_([^_]+)\.htm/([^/]+)$ fxconverter.php?f=$1&t=$2&amt=$3 [NC]
-
@likeforex.com 请更新您的问题。