<blockquote>
  <p>However, when I try to access any page apart from the homepage in my
  2nd locale in the frontend I get a 404 error.</p>
</blockquote>

<p>Could it be, that as a result of your settings, URL's for <code>/en</code> do not get rewritten correctly? I don't know how you redirect SEO-friendly urls, but most of the times (at least in my life) if accessing all pages but the homepage fails, it has something to do with URL rewriting.</p>

CC BY-SA 3.0
2018-04-16T14:28:55.690Z
You think the `.htaccess` could be the culprit?
Tobias S.
CC BY-SA 3.0
2018-04-16T14:29:49.227Z
It might be, did you change it at all after copying it to the `/en` folder? What does the redirect line look like?
Paul
CC BY-SA 3.0
2018-04-16T14:47:44.530Z
`RewriteRule (.+) index.php?p=$1 [QSA,L]`
Tobias S.
CC BY-SA 3.0
2018-04-16T14:22:37.713Z
2018-04-16T14:22:37.713Z
Paul
<p>I have my two locales set up as described in the official documentation. </p>

<p>I am able to translate my pages and fields in the CP as supposed to and have two versions ready in the backend, both with a green dot behind them. </p>

<p>However, when I try to access any page <em>apart from the homepage</em> in my 2nd locale in the frontend I get a 404 error.</p>

<p><code>DE</code> is my first locale, placed within the <code>/public/</code> folder. 
<code>EN</code> is my second locale, placed within the <code>/public/en/</code> folder with the <code>index.php</code> referring to <code>../../craft</code> as shown in the official docs and the same <code>.htaccess</code> copied from the parent <code>/public/</code> folder.</p>

<p>Furthermore, this is my <code>general.php</code> setup for the local development server, where I can not see any obvious mistakes yet:</p>

<pre><code>'.develop' =&gt; array(
  'rootUrl' =&gt; 'http://deque.develop:8888/',
'siteUrl' =&gt; array(
    'de' =&gt; 'http://deque.develop:8888/',
    'en' =&gt; 'http://deque.develop:8888/en/',
  ),
  'environmentVariables' =&gt; array(
  'baseUrl'  =&gt; 'http://deque.develop:8888',
  'basePath' =&gt; 'http://deque.develop:8888',
  'devMode' =&gt; true,
)
</code></pre>

<p>I did not write the <code>/en/</code> in any of the CP settings, only have the correct translations for the URL string there, so that should be no issue. The URLs are rendered fine and as supposed in the Frontend anyway. It’s just that a 404 is displayed for any English pages instead of the actual content.</p>

<p>In Craft’s log file I could only find this hinting at something:</p>

<pre><code>2018/04/13 12:52:20 [error] [exception.Craft\HttpException.404] Craft\HttpException in /Users/Tobias/Development/deque_2018/craft/app/controllers/TemplatesController.php:72
</code></pre>

<p>Any hints where I might be making a mistake?</p>

<localization><config><frontend><404><language>
Craft 2: Locale throwing 404 in frontend
# Craft 2: Locale throwing 404 in frontend

(Asked by: username_0 on 2018-04-16)

I have my two locales set up as described in the official documentation. 
I am able to translate my pages and fields in the CP as supposed to and have two versions ready in the backend, both with a green dot behind them. 
However, when I try to access any page apart from the homepage in my 2nd locale in the frontend I get a 404 error.
DE is my first locale, placed within the /public/ folder. 
EN is my second locale, placed within the /public/en/ folder with the index.php referring to ../../craft as shown in the official docs and the same .htaccess copied from the parent /public/ folder.
Furthermore, this is my general.php setup for the local development server, where I can not see any obvious mistakes yet:
'.develop' => array(
  'rootUrl' => 'http://deque.develop:8888/',
'siteUrl' => array(
    'de' => 'http://deque.develop:8888/',
    'en' => 'http://deque.develop:8888/en/',
  ),
  'environmentVariables' => array(
  'baseUrl'  => 'http://deque.develop:8888',
  'basePath' => 'http://deque.develop:8888',
  'devMode' => true,
)

I did not write the /en/ in any of the CP settings, only have the correct translations for the URL string there, so that should be no issue. The URLs are rendered fine and as supposed in the Frontend anyway. It’s just that a 404 is displayed for any English pages instead of the actual content.
In Craft’s log file I could only find this hinting at something:
2018/04/13 12:52:20 [error] [exception.Craft\HttpException.404] Craft\HttpException in /Users/Tobias/Development/deque_2018/craft/app/controllers/TemplatesController.php:72

Any hints where I might be making a mistake?

**Tags:** localization, config, frontend, 404, language

---

## 1 answers

### Answer by username_1 on 2018-04-16. Score: 2

> However, when I try to access any page apart from the homepage in my
> 2nd locale in the frontend I get a 404 error.

Could it be, that as a result of your settings, URL's for `/en` do not get rewritten correctly? I don't know how you redirect SEO-friendly urls, but most of the times (at least in my life) if accessing all pages but the homepage fails, it has something to do with URL rewriting.

> **Comments:**
> **username_0**: You think the `.htaccess` could be the culprit?  
> **username_1**: It might be, did you change it at all after copying it to the `/en` folder? What does the redirect line look like?  
> **username_0**: `RewriteRule (.+) index.php?p=$1 [QSA,L]`  

---

