开发者

301 redirect from top-level domain to index.html in subdirectory

I am working on a small multi-language website. Originally, all of the html files were in the top level directory. Each page has an English version and a Spanish version, which are different html files. I would like to put these files in their own subdirectories, en/ and es/, and then redirect the top-level domain to en/index.html (since English will be the default language).

But if I do this using a 301 redirect, won't search engines remove my top-l开发者_运维技巧evel domain from their indexes? What I want is for users to enter www.example.com and arrive at www.example.com/en/index.html, but I still want www.example.com to show up in the SERPs.

I have no experience with Apache, so I don't know the correct approach for this. I read a little bit about 301 redirects, and it seemed like a possible way to do what I want, but I have no idea if it is the best way.

Am I on the right track here?


Use 302 Found instead of 301 Moved Permanently.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜