使用#!重定向URL!动态内容

编程入门 行业动态 更新时间:2024-10-08 00:24:06
本文介绍了使用#!重定向URL!动态内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个在Wix上创建的临时站点,不久将需要移动到Zend Framework 2中创建的新站点。出于SEO的原因,为了不失去目前获得的排名,我需要301重定向以下网址的页面网址:旧站点到新站点中的页面,问题是Wix使用了一些奇怪的地址,例如www.mysite/#!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/#!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!动态内容

本文发布于:2023-10-10 18:25:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1479374.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重定向   内容   动态   URL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!