【发布时间】:2010-09-03 21:31:02
【问题描述】:
我需要在我的 url 中替换 & 符号的编码值,以便搜索查询成功。我正在努力从post 的解决方案中复制类似的方法来获取如下查询字符串。
lovelakedistrict.com/result/?q=Brookfield+Bed+%2526+Breakfast
我希望它是这样的
lovelakedistrict.com/result/?q=Brookfield+Bed+&+早餐
原因是带有 %2526 的 url 在 google 中被编入索引并且显然被破坏了。
【问题讨论】:
-
它实际上应该是lovelakedistrict.com/result/?q=Brookfield+Bed+%26+Breakfast 所以
q的值是Brookfield Bed & Breakfast,比如这里:google.com/search?q=Brookfield+Bed+%26+Breakfast
标签: apache url .htaccess encoding rewrite