比如:
http://segmentfault.com/search?q=hello
我想实现:
http://segmentfault.com/search/hello
这种URL。
搜索表单用的'GET'URL后面会 ?、& 什么的。
使用Rewrite可以直接搜索http://segmentfault.com/search/hello这样的链接。
但是在搜索表单搜索时URL却还是出现带 ?、& 这样的符号。
导致URL好难看。
请问各位有什么办法可以改写?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
Rewrite On
RewriteRule ^search?q=(.*)$ /search/index.php?keyboard=$1