如何检测和URL重定向锚使用mod_rewrite / htaccess的? [英] How to Detect and Redirect from URL with Anchor Using mod_rewrite/htaccess?

查看:93
本文介绍了如何检测和URL重定向锚使用mod_rewrite / htaccess的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到了一些相反的例子,但我正在寻找从一个锚点/哈希URL去非锚定的URL,就像这样:

I've seen a number of examples of the opposite, but I'm looking to go from an anchor/hash URL to a non-anchor URL, like so:

From: http://old.swfaddress-site.com/#/page/name
To:   http://new.html-site.com/page/name

无的例子在的http://karoshiethos.com/2008/07/25/handling-urlen$c$cd-swfaddress-links-with-mod_rewrite/已经运作了我。这听起来像 REQUEST_URI /#/东东在里面,但无论我还是我的Apache(2.0.54)看看吧。

None of the examples at http://karoshiethos.com/2008/07/25/handling-urlencoded-swfaddress-links-with-mod_rewrite/ have functioned for me. It sounds like REQUEST_URI has the /#/stuff in it, but neither me nor my Apache (2.0.54) see it.

任何想法,过去的经历或成功?

Any ideas, past experiences or successes?

推荐答案

的片段,并会的没有的发送任何到Web服务器。在任何时候你无法捕捉到它那里,你将不得不使用一个客户端片面地捕捉那些。

Anything after the # is a fragment, and will not be sent to the webserver. You cannot capture it at any point there, you'll have to use a client-sided approach to capture those.

这篇关于如何检测和URL重定向锚使用mod_rewrite / htaccess的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆