【问题标题】:How do I get google to display my link as example.com NOT example.com/如何让谷歌将我的链接显示为 example.com 而不是 example.com/
【发布时间】:2010-09-30 20:52:46
【问题描述】:

目前 google 将我的网站链接显示为...

example.com/

...但是,我希望它显示为...

example.com

我确实有以下元数据

<link rel="canonical" href="http://example.com" />

...以下是我的htaccess文件...

IndexIgnore * 

ErrorDocument 400 /error 
ErrorDocument 401 /error 
ErrorDocument 403 /error 
ErrorDocument 404 /error 
ErrorDocument 500 /error 

RewriteEngine on 
RewriteBase / 

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ 
RewriteRule ^index\.php$ / [R=301,L] 

RewriteRule ^(home|cv|handouts|links|contact|copyright|cv)/?$ /index.php?module=home&action=$1 
RewriteRule ^(log(in|out))/?$ /index.php?module=authentication&action=$1 

RewriteRule ^photos/?$ /index.php?module=gallery&action=album&album=general 
RewriteRule ^gallery/?$ /index.php?module=gallery&action=album&album=general 
RewriteRule ^gallery/([^/\.]+)/?$ /index.php?module=gallery&action=album&album=$1 
RewriteRule ^gallery/([^/\.]+)/([^/\.]+)/?$ /index.php?module=gallery&action=album&album=$1$&page=$2 
RewriteRule ^gallery/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /index.php?module=gallery&action=item&album=$1$&page=$2&item=$3 

RewriteRule ^release/?$ /index.php?module=release&action=release 
RewriteRule ^error/?$ /index.php?module=error&action=error 

... 并且 htaccess 文件如上所述,我注意到访问 example.com 或 example.com/index.php 会重定向到 example.com/ 这可能是问题??

说了这么多,以及关于如何让谷歌将我的链接显示为 example.com 而不是 example.com/的任何想法

提前致谢!

【问题讨论】:

  • 对不起,我没有答案,我只是想知道为什么这很重要? :)

标签: apache .htaccess seo


【解决方案1】:

运行Google Search。其数据库中的每个单个网站的域名后面都有一个斜杠。他们唯一没有尾部斜杠的情况是在路径组件之后。路径组件尾部斜杠由每个网站的管理员决定。

将来他们可能会像在 Chrome 中那样隐藏尾部斜杠,但目前 无能为力。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-05-18
    • 2022-01-02
    • 1970-01-01
    • 2016-03-02
    • 2020-06-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多