【发布时间】:2012-02-05 15:27:02
【问题描述】:
我正在尝试转换此 URL:
http://localhost/?q=foo&s=search
关于这个:
http://localhost/?q=+foo&s=search (i add a plus sign before the user query)
我试过了:
RewriteCond %{QUERY_STRING} ^q=(.*)$ [NC]
RewriteRule ^(.*)$ /?q=\+%1 [R=301,L,NE]
但这会产生:
http://localhost/?q=+++++++++++++++++++++foo
关于如何在查询前添加加号的任何建议?
【问题讨论】:
标签: apache url mod-rewrite redirect