开发者

Simple redirect with htaccess

开发者 https://www.devze.com 2023-02-16 08:48 出处:网络
I know this is a simple and quick t开发者_JAVA百科hing, 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.

I know this is a simple and quick t开发者_JAVA百科hing, 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!


Create a .htacess fil with the following contents:

Redirect permanent /german.html http://yourdomain.com/de
Redirect permanent /swedish.html http://yourdomain.com/sv
....

I hope this is what you ment and that it helps :)

0

精彩评论

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