使用 htaccess 进行简单重定向
我知道这是一件简单而快速的事情,但网站将在几个小时内上线,而且我在 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 来做吧?
或者有更好的方法吗?
多谢!
I know this is a simple and quick thing, but site is going live within hours and I dont have any experience on htaccess so Im hoping someone could give some quick help with this.
So what I want is that I have html files root folder. Files are index.html, german.html, swedish.html, spanish.html, danish.html. Now I would like to have the URL so that german site would be in www.domain.com/de swedish www.domain.com/sv english/default in www.domain.com/en and so on. This should be possible to do with htaccess right?
Or is there better way to do it?
Thanks alot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建一个包含以下内容的 .htacess 文件:
我希望这就是您所希望的并且它有帮助:)
Create a .htacess fil with the following contents:
I hope this is what you ment and that it helps :)