I have a localized site set up where the language switcher and translations are working fine. However when I link to internal pages it goes to a 404.
general.php has this:
//local only
'etf-craft.dev' => array(
'devMode' => true,
'siteUrl' => array(
'en' => 'http://etf-craft.dev/en/',
'fr' => 'http://etf-craft.dev/fr/'
),
'environmentVariables' => array(
'environment' => 'local',
'basePath' => 'D:\sites\etf-craft\public_html',
'baseUrl' => 'http://etf-craft.dev',
)
),
site structure is like this:
- craft
- public
- public/en/
- public/fr/
index.php in /fr/ and /en/ directories contains the following where french says /fr/ instead of /en/:
// Path to your craft/ folder
$craftPath = '../../craft';
// Tell Craft to serve the English content
define('CRAFT_LOCALE', 'en');
One link I've created that 404s on me is:
<li>
<a href="/{{ craft.locale }}/news" class="news">{{ "News" | t}}
<i class="arrow right"></i>
</a>
</li>
What I expect is that it takes me to http://etf-craft.dev/en/news and the news page shows up. However I end up going to a 404.
However if I manually remove the /en/ from the address bar the news template shows up correctly.
- not working - http://etf-craft.dev/en/news
- working - http://etf-craft.dev/news
What am I doing wrong?
$craftPath = '../../craft';
? – Natetronn Nov 13 '17 at 22:27'fr' => 'http://etf-craft.dev/fr/',
– Natetronn Nov 13 '17 at 22:52