【发布时间】:2011-04-04 22:37:30
【问题描述】:
对于我的搜索引擎,我有页面...
/index.php?q=TERM
...显示搜索结果。
使用 mod_rewrite,我可以通过以下方式访问它:
/q/期限
我在 .htaccess 中使用的规则是这样的:
RewriteEngine on
RewriteRule ^q/(.+)$ index.php?q=$1
这很好用。但是当我在我的 HTML 表单中输入一个术语并单击提交按钮时,我仍然被重定向到...
/index.php?q=TERM
如何让我的 GET 表单直接调用新的短 URL?它的代码是:
<form action="/index.php" method="get" accept-charset="utf-8">
...
</form>
【问题讨论】:
标签: forms url mod-rewrite