我知道这是一个简单而快速的事情,但网站在几小时内上线,我没有任何htaccess的经验,所以我希望有人可以给这个快速帮助。
所以我想要的是我有html文件的根文件夹。文件是index.html,german.html,swedish.html,spanish.html,danish.html。现在我想拥有这个URL,以便德国网站在www.domain.com/de swedish www.domain.com/sv english / default www.domain.com/en等等。这应该可以用htaccess吗?
或者有更好的方法吗?
非常感谢!
答案 0 :(得分:6)
使用以下内容创建.htaccess文件:
Redirect permanent /german.html http://yourdomain.com/de
Redirect permanent /swedish.html http://yourdomain.com/sv
....
我希望这就是你的意思,它有助于:)