Answers.Body: <p>Okay, so I found the answer. And the reason it wasn't working is because I've been using another <code>.htaccess</code> (a hybrid of h5bp and Craft) than the default that comes with the Craft download. And this <code>.htaccess</code> included a <code>RewriteBase</code>, which was set to <code>/</code>. So when one tried to access <code>/no/{slug}</code> the <code>RewriteBase</code> would send it up one folder, basically. So I had to go into each of the locales <code>.htaccess</code> and set their <code>RewriteBase</code> to <code>/no</code> and so on.</p>
  
  <p>I'm just gonna leave it here, and I'm pretty sure I'm gonna find this post again the next time I'm making a multi-lingual site and don't understand why all of my links are broken...</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-03T17:22:59.527Z
Answers.Text: Thank you! My whole site wasn't showing my secondary locale except the homepage, and it was the hidden file .htaccess that didn't copy over onto the FTP. thanks for the save!
Answers.UserDisplayName: mateostabio
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-14T08:30:31.717Z
Answers.LastActivityDate: 2015-07-14T08:30:31.717Z
Answers.UserDisplayName: peirix
Body: <p>So I'm setting up a multi-lingual site for the first time, and I'm having some problems with the urls.</p>
  
  <p>I followed the <a href="http://buildwithcraft.com/docs/localization-guide" rel="nofollow noreferrer">guide</a>, step by step. I've set up the <code>siteUrl</code> in <code>general.php</code>:</p>
  
  <pre><code>'DEV' =&gt; array(
      'devMode' =&gt; true,
      'siteUrl' =&gt; array(
          'no' =&gt; 'http://teknologi.dev/no/',
          'en' =&gt; 'http://teknologi.dev/en/',
          'es' =&gt; 'http://teknologi.dev/es/'
      ),
  ),
  </code></pre>
  
  <p>And I guess that works, since I get a message in General settings that the siteUrl has been defined elsewhere.</p>
  
  <p><img src="https://i.sstatic.net/5o1bS.png" alt="General settings"></p>
  
  <p>Then I have a section called "Videos", which I've set up like this:</p>
  
  <p><img src="https://i.sstatic.net/DPeqe.png" alt="Videos section"></p>
  
  <p>And when I list out all the entries, the URL to one entry looks right, but I'm getting a 404. If I however change the Entry URL Format to include the locale letters, ex: <code>no/videoer/{slug}</code>, it works. But that makes the URLs write out the locales twice, so a URL might look like: <code>http://teknologi.dev/no/no/videoer/orkanger</code>, which of course gives a 404.</p>
  
  <p>So is there some step I've missed?</p>
  
  <p><strong>Edit:</strong> I also have this structure in my <code>www</code> folder:</p>
  
  <pre><code>- .htaccess
  - index.php // I needed this one for admin to work?
  - no/
    - .htaccess
    - index.php
  - en/
    - .htaccess
    - index.php
  - es/
    - .htaccess
    - index.php
  </code></pre>
  
  <p>And in each of the localized index files I have changed the <code>craftPath</code> and the <code>CRAFT_LOCALE</code></p>
  
  <pre><code>$craftPath = '../../craft';
  define('CRAFT_LOCALE', 'no');
  </code></pre>
  
  <p>While the root index.php points <code>craftPath</code> to <code>../craft</code>.</p>
  
  <p><strong>Edit 2:</strong> I tried deleting the root <code>index.php</code>, and while <code>/no/</code> still worked, every subpage (ex: <code>/no/videoer/</code>) gave this error message:</p>
  
  <pre><code>The requested URL /index.php was not found on this server.
  </code></pre>
  
  <p>Do I need to do anything in my <code>.htaccess</code> for locales?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-14T07:59:27.227Z
Comments.Text: First time I did this I forgot to define `CRAFT_LOCALE` in each of the locales index.php, and I think that resulted in 404s all around.
Comments.UserDisplayName: megatrond
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-14T08:12:17.543Z
Comments.Text: @megatrond Yeah, I did that too. But now that you mentioned it, I'm a bit unsure about my root folder setup. I've updated my question with file structure.
Comments.UserDisplayName: peirix
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-14T08:18:26.313Z
Comments.Text: Don't think you need the index.php in your root. You would then access the CP from /no/admin/login. You could set up your htaccess so that /no/ is the default index page.
Comments.UserDisplayName: Patrick Nesbitt
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-14T08:21:34.617Z
Comments.Text: @PatrickNesbitt Tried deleting the index.php file as you said, but that gave a whole new error that I've not seen before. I updated the question.
Comments.UserDisplayName: peirix
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-14T08:27:12.230Z
Comments.Text: @perlix You shouldn't need anything in the htaccess file at root (except maybe a redirect to /no/)...your htaccess in each locale directory should be the standard Craft htaccess file.
Comments.UserDisplayName: Patrick Nesbitt
Tags: <localization>
Title: Problems with channel and locales
ThreadText: # Problems with channel and locales
  
  (Asked by: username_0 on 2015-07-14)
  
  So I'm setting up a multi-lingual site for the first time, and I'm having some problems with the urls.
  
  I followed the [guide](http://buildwithcraft.com/docs/localization-guide), step by step. I've set up the `siteUrl` in `general.php`:
  
  ```
  'DEV' => array(
      'devMode' => true,
      'siteUrl' => array(
          'no' => 'http://teknologi.dev/no/',
          'en' => 'http://teknologi.dev/en/',
          'es' => 'http://teknologi.dev/es/'
      ),
  ),
  
  ```
  
  And I guess that works, since I get a message in General settings that the siteUrl has been defined elsewhere.
  
  ![General settings](https://i.sstatic.net/5o1bS.png)
  
  Then I have a section called "Videos", which I've set up like this:
  
  ![Videos section](https://i.sstatic.net/DPeqe.png)
  
  And when I list out all the entries, the URL to one entry looks right, but I'm getting a 404. If I however change the Entry URL Format to include the locale letters, ex: `no/videoer/{slug}`, it works. But that makes the URLs write out the locales twice, so a URL might look like: `http://teknologi.dev/no/no/videoer/orkanger`, which of course gives a 404.
  
  So is there some step I've missed?
  
  **Edit:** I also have this structure in my `www` folder:
  
  ```
  - .htaccess
  - index.php // I needed this one for admin to work?
  - no/
    - .htaccess
    - index.php
  - en/
    - .htaccess
    - index.php
  - es/
    - .htaccess
    - index.php
  
  ```
  
  And in each of the localized index files I have changed the `craftPath` and the `CRAFT_LOCALE`
  
  ```
  $craftPath = '../../craft';
  define('CRAFT_LOCALE', 'no');
  
  ```
  
  While the root index.php points `craftPath` to `../craft`.
  
  **Edit 2:** I tried deleting the root `index.php`, and while `/no/` still worked, every subpage (ex: `/no/videoer/`) gave this error message:
  
  ```
  The requested URL /index.php was not found on this server.
  
  ```
  
  Do I need to do anything in my `.htaccess` for locales?
  
  **Tags:** localization
  
  > **Comments:**
  > **username_1**: First time I did this I forgot to define `CRAFT_LOCALE` in each of the locales index.php, and I think that resulted in 404s all around.  
  > **username_0**: @username_1 Yeah, I did that too. But now that you mentioned it, I'm a bit unsure about my root folder setup. I've updated my question with file structure.  
  > **username_2**: Don't think you need the index.php in your root. You would then access the CP from /no/admin/login. You could set up your htaccess so that /no/ is the default index page.  
  > **username_0**: @username_2 Tried deleting the index.php file as you said, but that gave a whole new error that I've not seen before. I updated the question.  
  > **username_2**: @perlix You shouldn't need anything in the htaccess file at root (except maybe a redirect to /no/)...your htaccess in each locale directory should be the standard Craft htaccess file.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-07-14. Score: 6 | Accepted answer
  
  Okay, so I found the answer. And the reason it wasn't working is because I've been using another `.htaccess` (a hybrid of h5bp and Craft) than the default that comes with the Craft download. And this `.htaccess` included a `RewriteBase`, which was set to `/`. So when one tried to access `/no/{slug}` the `RewriteBase` would send it up one folder, basically. So I had to go into each of the locales `.htaccess` and set their `RewriteBase` to `/no` and so on.
  
  I'm just gonna leave it here, and I'm pretty sure I'm gonna find this post again the next time I'm making a multi-lingual site and don't understand why all of my links are broken...
  
  > **Comments:**
  > **username_3**: Thank you! My whole site wasn't showing my secondary locale except the homepage, and it was the hidden file .htaccess that didn't copy over onto the FTP. thanks for the save!  
  
  ---
  
  