【发布时间】: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/的任何想法
提前致谢!
【问题讨论】:
-
对不起,我没有答案,我只是想知道为什么这很重要? :)