URL重写 - 删除散列 [英] URL rewriting - removing hash
本文介绍了URL重写 - 删除散列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能删除网页的URL的井号(#)? 我现在用的是SWFAddress插件(jQuery的)用于深层链接的目的。
How can I remove the hash sign (#) from the page's URL ? I am using the SWFAddress plugin (jQuery) for deep linking purposes.
我需要更换这个
本地主机/网站/#博客
localhost/site/#blog
按
本地主机/网站/博客
(是的,#blog只是一个锚)。
(Yes, #blog is just an anchor).
在.htaccess不知怎的,URL重写无法正常工作
Somehow url rewriting in .htaccess doesn't work
重写规则/博客#blog [L]
RewriteRule /blog #blog [L]
有什么建议?
推荐答案
在URL中的哈希位,请求一个页面时,不发送到服务器,这样你就不能使用重定向这样的规则。这只是客户端。
The bit with the hash in the URL is not sent to the server when requesting a page, so you can't use redirect rules like that. It's client-side only.
这篇关于URL重写 - 删除散列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文