I have a localized site, localization works fine for homepage (/en/), however the links to other page does not work (/en/rooms) where /chambres works fine for default language.
The English 'chambres' page is accessible with /en/?p=rooms
I would like the english page being accessible with /en/rooms
It's definitely an Nginx vhost config issue. The config listed in Locales sub directories on Nginx didn't solve my problem.
This is my english index.php:
// Tell Craft to serve the English content
define('CRAFT_LOCALE', 'en');
This is in my general config file:
'quartiergeneral.craft.dev' => array(
'devMode' => true,
'usePathInfo' => true,
'omitScriptNameInUrls' => true,
'environmentVariables' => array(
'basePath' => '/home/vagrant/Code/quartiergeneral/craft/public/',
'baseUrl' => 'http://quartiergeneral.craft.dev:8000/',
),
'siteUrl' => array(
'fr' => 'http://quartiergeneral.craft.dev:8000/',
'nl' => 'http://quartiergeneral.craft.dev:8000/nl/',
'en' => 'http://quartiergeneral.craft.dev:8000/en/',
),
),
This is my nginx config vhost:
server {
listen 80;
server_name quartiergeneral.craft.dev;
root /home/vagrant/Code/quartiergeneral/craft/public;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite ^(.*) /index.php?p=$1 last;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/quartiergeneral.craft.dev-error.log error;
error_page 404 /index.php;
sendfile off;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}