使用#!重定向URL!动态内容 [英] Redirect URLs with #! dynamic content

查看:111
本文介绍了使用#!重定向URL!动态内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Wix上创建的临时站点,不久将需要移动到Zend Framework 2中创建的新站点。出于SEO的原因,为了不失去目前获得的排名,我需要301重定向以下网址的页面网址:旧站点到新站点中的页面,问题是Wix使用了一些奇怪的地址,例如www.mysite.com/#!about/etc,因此.htaccess中的Redirect 301规则在#之后不起作用。不被视为链接的一部分。如何从此类URL进行重定向而不丢失其Google汁?谢谢。

I had a temporary site made on Wix, and will soon need to move to a new one made in Zend Framework 2. For SEO reasons, not to lose the ranking gained so far, I need to 301 redirect the page URLs of the old site to pages in the new one, the problem is that Wix uses some weird addresses like www.mysite.com/#!about/etc, so the Redirect 301 rule in .htaccess doesn't work as the stuff after the # is not seen as a part of the link. How can I redirect from such URLs without losing their Google juice? Thanks.

推荐答案

经过更多研究,我发现Wix正在使用Ajax爬行,当您需要移动时,这确实不友好离开并重定向页面,因为它使用#!在网址中。
我还发现Google将这些网址解析为转义的片段,因此我使用了

After some more research, I found out Wix is using Ajax crawling, which is really unfriendly when you need to move away and redirect your pages, as it uses #! in the URLs. I also found out that those URLs get parsed by Google as escaped fragments, so I used

RewriteCond %{QUERY_STRING} ^_escaped_fragment_=about/etc$
RewriteRule ^$ /about? [R=301,L]

希望完成这项工作并将我的旧页的Google果汁重定向到新的。

Hope that does the job and redirects my old pages' Google juice to the new ones.

这篇关于使用#!重定向URL!动态内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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