WebFaction
Community site: login faq

Hi,

With Apache I was able to setup the same html file for different localizations by appending the two letter language code to the end of the file name. Depending on the browser's languages settings, different versions of the same file would be displayed.

For example:

index.html.en, index.html.fr, index.html.de, index.html.jp

The user would see the appropriate index file depending on their browser's language settings.

How can I do the same thing with WebFaction's web servers? I tried the above, but I got a file not found error when I tried to visit index.html. It should have defaulted to displaying index.html.en to me.

Thanks,

Brendan

asked 12 Sep '13, 14:48

tapzapp
11
accept rate: 0%


This is possible with these .htaccess rules,

Options +MultiViews
AddLanguage en .en
AddLanguage fr .fr
AddLanguage de .de
LanguagePriority en fr de

If you get a 'permission denied' or a 'forbidden' error it might be permissions and these commands ran in the application directory should resolve it,

chmod -R 0755 .
chmod -R g-s .
chmod -R u-s .
chmod -R -t .
setfacl -R -b .
find . -type f -exec chmod 0644 "{}" \;
permanent link

answered 12 Sep '13, 20:06

johns
5.3k312
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×10
×1

question asked: 12 Sep '13, 14:48

question was seen: 1,128 times

last updated: 12 Sep '13, 20:06

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM