我有一個形式的網頁,有3個參數,如URL重寫與形式和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(頁面中間)的值時,表單被重新組合,並且重新組合的頁面仍然是參數格式。如何在重寫格式後製作網址?
提交按鈕或其他任何錯誤?
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,否則它是一個猜謎遊戲...... – 2012-07-14 16:18:06
沒什麼。只有RewriteRule ^(。*)_([^ _] +).htm /([^ /] +)$ fxconverter.php?f = $ 1&t = $ 2&amt = $ 3 [NC] – 2012-07-14 16:22:50
@ likeforex.com請更新你的問題。 – Gumbo 2012-07-14 16:26:42