【问题标题】:.htacces rewrite rules for single page anchor (seo friendly).htaccess 单页锚的重写规则(seo 友好)
【发布时间】:2015-06-30 05:15:58
【问题描述】:

我有一个单页网站,我正在使用锚点来浏览它。我想让我的锚链接 SEO 友好。我在本地主机上使用 apache 服务器。

我想改变:

http://localhost/Parllax%20Website/index.html#about

http://localhost/Parllax%20Website/about

index.html/index

【问题讨论】:

  • 如果您每次都必须重新加载整个页面,这难道不会违背使用锚点导航的全部目的吗?

标签: html apache .htaccess seo


【解决方案1】:

浏览器永远不会将锚点/哈希值发送到服务器。您不能使用 Apache 重定向用户。

一个可能的解决方案是使用 javascript 和 window.history API 来更改网址。您需要使用 ajax 请求加载页面内容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-03-25
    • 1970-01-01
    • 2019-10-31
    • 2021-07-06
    • 2015-01-04
    • 1970-01-01
    • 2015-06-03
    相关资源
    最近更新 更多