有很多
网站都是同时有多个语言版本,比如各个语言版本在不同的目录,分为en,fr,de,cn等等。一般都是
http://www.domain.com 重定向到
http://www.domain.com/en/index.htm,默认英文为主页。
最安全的做法是在.htaccess中使用 301 redirect 重定向方法。此种方法也似乎是速度最快的。
下面两行是范例,分别将
www.microsoft.com 和
www.microsoft.com/index.htm 的访问重定向到
http://www.microsoft.com/en/index.htm。这两行要写在.htaccess文件的最开头。
redirect 301 /.
http://www.microsoft.com/en/index.htm
redirect 301 /index.htm
http://www.microsoft.com/en/index.htm
=====================================
Strategy 2 - Meta Refresh
This is a technique often used by spammers to trick search engines and it should be avoided, unless the page is in a section of your site that isn't spidered.
What the search engine spammers do is to create a page that is optimized for certain keywords and phrases - it usually has no real content. The page is then picked up by some search engines, but when a visitor clicks on the search engine entry, they are redirected to another site, often unrelated.
It's a despicable trick, but thankfully most search engines have filters to detect this. Using this form of SE deception will see a site eventually banned or penalized by major players such as Google.
Strategy 3 - 301 Redirect
A 301 redirect is the most efficient and spider/visitor friendly strategy around for web sites that are hosted on servers running Apache (check with your hosting service if you aren't sure). It's not that hard to implement and it should preserve your search engine rankings for that particular page. If you *have* to change file names or move pages around, it's the safest option.
A 301 redirect is implemented in your .htaccess file.
[ 本贴由 virus2003 于 2004-9-5 21:05 编辑过 ]