I get a 404 page when I try to open an Italian page. Homepage www.domain.com/it/
works, but when I proceed to www.domain.com/it/assistenza-e-supporto
it gives me a 404.
English version works. Any idea where I should look to fix this?
I've followed the steps as desribed here: https://craftcms.com/docs/localization-guide
Config looks like this:
return array(
'cpTrigger' => 'admin',
'omitScriptNameInUrls' => true,
'devMode' => true,
'siteUrl' => array(
'en_US' => 'http://local.crafttraining.craft.dev/',
'es' => 'http://local.crafttraining.craft.dev/es/',
'it' => 'http://local.crafttraining.craft.dev/it/',
),
);
Update: After a day of trying and searching I found out that once I remove the omitScriptNameInUrls from the general.php it works fine, but I would like to have nice url's.
.htaccess looks like this:
<IfModule mod_rewrite.c>
RewriteEngine On
# Send would-be 404 requests to Craft
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
RewriteRule (.+) index.php?p=$1 [QSA,L]
</IfModule>
What am I doing wrong. Thanks for helping me out with this.
{% set pages = craft.entries.section('contentPages').level(1) %}. {% for page in pages %} <li>{{ page.getLink() }}</li> {% endfor %}
This generates the links to the italian pages. Eg: local.crafttraining.craft.dev/it/assistenza-e-supporto. Now, when I click that link, I get a 404 page. I checked the docs once more, but cannot find what I am doing wrong.it/.htaccess
? I think I saw that causing 404s somewhere.