比如:
http://segmentfault.com/search?q=hello
我想实现:
http://segmentfault.com/search/hello
这种URL。
搜索表单用的'GET'URL后面会 ?、& 什么的。
使用Rewrite可以直接搜索http://segmentfault.com/search/hello这样的链接。
但是在搜索表单搜索时URL却还是出现带 ?、& 这样的符号。
导致URL好难看。
请问各位有什么办法可以改写?
比如:
http://segmentfault.com/search?q=hello
我想实现:
http://segmentfault.com/search/hello
这种URL。
搜索表单用的'GET'URL后面会 ?、& 什么的。
使用Rewrite可以直接搜索http://segmentfault.com/search/hello这样的链接。
但是在搜索表单搜索时URL却还是出现带 ?、& 这样的符号。
导致URL好难看。
请问各位有什么办法可以改写?
2 回答1.3k 阅读✓ 已解决
1 回答943 阅读✓ 已解决
2 回答834 阅读✓ 已解决
1 回答1k 阅读✓ 已解决
2 回答891 阅读
1 回答880 阅读
1 回答811 阅读
Rewrite On
RewriteRule ^search?q=(.*)$ /search/index.php?keyboard=$1