Answers.Body: <p>You made the template filename and folder match the URI (<a href="http://buildwithcraft.com/docs/routing" rel="nofollow">routing case 6</a>), which is not necessary for entries. Because you probably also set a template in the section setting, this is getting loaded for <a href="http://example.com/work/" rel="nofollow">http://example.com/work/</a> (<a href="http://buildwithcraft.com/docs/routing" rel="nofollow">routing case 4</a>).</p>
  
  <p>So I think you should just edit the single section's settings and point to the right template.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-26T12:39:44.743Z
Answers.Text: Thanks for your help. I thought the folder structure was necessary for it work, since there already was a folder in my templates called 'news', which was holding the channel section.
  
  I think I'm getting somewhere, but example.com/work/ still doesn't work. Right now it -does- work when I go to example.com/index.php/work/, since the URI that I entered now is just 'work'. Somehow there is something with these slashes.
Answers.UserDisplayName: GeirrBenayahu
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-26T12:44:11.887Z
Answers.Text: Yes, but there's no single section for "news". It's a channel and the channel entries are routed to /news/_entry.html (see section settings). The template for the channel index page /news/index.html does not have any entry at all (routing case 6).
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-26T12:47:12.580Z
Answers.Text: @GeirrBenayahu also have a look at this help article: http://buildwithcraft.com/help/why-index.php
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-27T13:35:09.313Z
Answers.Text: Okay ehm... So yeah, I first broke Craft for reasons that I cannot really trace back. I think I replaced one of the files with a wrong one. But after fixing it with the correct files I now also need a example.com/index.php/admin kind-of link to go to my admin panel, which before wasn't necessary. I really have no clue what happened and don't know how to fix this... even after reinstalling the folder. 
  Also the above options haven't been able to fix the initial issue. Maybe someone can explain a bit more thoroughly how this works and how the syntax should be? That would be truly awesome.
Answers.UserDisplayName: GeirrBenayahu
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-27T13:37:51.977Z
Answers.Text: I mean I understand how it is explained in the help files of Craft and in its documentation. But I just can't figure out what I need to do in order to fix this. I tried so many variations with the URI and URL, but none of it works... :(
Answers.UserDisplayName: GeirrBenayahu
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-27T13:45:39.200Z
Answers.Text: So you did set `'omitScriptNameInUrls' => true,`, but you still can't get http://example.com/admin to work? Try fixing this first before testing you /work links. `mod_rewrite` is enabled and server restarted with it?
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-27T14:54:51.597Z
Answers.Text: Yes, I also added `'omitScriptNameInUrls' => true,` but no change. I am doing a new clean install of Craft again with an empty database.
Answers.UserDisplayName: GeirrBenayahu
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-27T16:03:39.460Z
Answers.Text: OK, I found out the problem! It really had nothing to do with what I mentioned earlier. For some reason my version of Craft came with a 'htaccess' file without the . in front of its filename. I added that and now everything works exactly how I wanted it!
Answers.UserDisplayName: GeirrBenayahu
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-27T16:08:01.767Z
Answers.Text: Ahh ok, that's how they ship it and you have to rename it manually. See http://buildwithcraft.com/docs/installing#step-1-upload-the-files. I think it's because dot files are hidden by default, so they make sure you find it.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-27T16:10:46.173Z
Answers.Text: Yes, you're right. I should've known this. I've read that before and actually done it, haha.
Answers.UserDisplayName: GeirrBenayahu
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-26T12:11:24.523Z
Answers.LastActivityDate: 2015-05-26T12:11:24.523Z
Answers.UserDisplayName: carlcs
Body: <p>For some reason there is not really a clear mention on the Craft documentation about this. And I couldn't really find anything in here that explains it either. I know this is kind of basic knowledge for Craft, so here goes:</p>
  
  <p>I made a single section called 'work' and a folder of the same name in my templates folder (with an index.html inside). I try to link to it with <a href="http://www.mydomain.com/work/" rel="nofollow">http://www.mydomain.com/work/</a> but it doesn't work! It gives a 404 error. I don't understand why it doesn't work. I don't remember having trouble with this before.</p>
  
  <p>What can possibly go wrong?</p>
  
  <p>How do I create simple links like this to other singles?</p>
  
Tags: <url><sections><singles>
Title: Simple linkage to singles
ThreadText: # Simple linkage to singles
  
  (Asked by: username_0 on 2015-05-26)
  
  For some reason there is not really a clear mention on the Craft documentation about this. And I couldn't really find anything in here that explains it either. I know this is kind of basic knowledge for Craft, so here goes:
  
  I made a single section called 'work' and a folder of the same name in my templates folder (with an index.html inside). I try to link to it with <http://www.mydomain.com/work/> but it doesn't work! It gives a 404 error. I don't understand why it doesn't work. I don't remember having trouble with this before.
  
  What can possibly go wrong?
  
  How do I create simple links like this to other singles?
  
  **Tags:** url, sections, singles
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-05-26. Score: 1 | Accepted answer
  
  You made the template filename and folder match the URI ([routing case 6](http://buildwithcraft.com/docs/routing)), which is not necessary for entries. Because you probably also set a template in the section setting, this is getting loaded for <http://example.com/work/> ([routing case 4](http://buildwithcraft.com/docs/routing)).
  
  So I think you should just edit the single section's settings and point to the right template.
  
  > **Comments:**
  > **username_0**: Thanks for your help. I thought the folder structure was necessary for it work, since there already was a folder in my templates called 'news', which was holding the channel section.  I think I'm getting somewhere, but example.com/work/ still doesn't work. Right now it -does- work when I go to example.com/index.php/work/, since the URI that I entered now is just 'work'. Somehow there is something with these slashes.  
  > **username_1**: Yes, but there's no single section for "news". It's a channel and the channel entries are routed to /news/_entry.html (see section settings). The template for the channel index page /news/index.html does not have any entry at all (routing case 6).  
  > **username_1**: @username_0 also have a look at this help article: http://buildwithcraft.com/help/why-index.php  
  > **username_0**: Okay ehm... So yeah, I first broke Craft for reasons that I cannot really trace back. I think I replaced one of the files with a wrong one. But after fixing it with the correct files I now also need a example.com/index.php/admin kind-of link to go to my admin panel, which before wasn't necessary. I really have no clue what happened and don't know how to fix this... even after reinstalling the folder.  Also the above options haven't been able to fix the initial issue. Maybe someone can explain a bit more thoroughly how this works and how the syntax should be? That would be truly awesome.  
  > **username_0**: I mean I understand how it is explained in the help files of Craft and in its documentation. But I just can't figure out what I need to do in order to fix this. I tried so many variations with the URI and URL, but none of it works... :(  
  > **username_1**: So you did set `'omitScriptNameInUrls' => true,`, but you still can't get http://example.com/admin to work? Try fixing this first before testing you /work links. `mod_rewrite` is enabled and server restarted with it?  
  > **username_0**: Yes, I also added `'omitScriptNameInUrls' => true,` but no change. I am doing a new clean install of Craft again with an empty database.  
  > **username_0**: OK, I found out the problem! It really had nothing to do with what I mentioned earlier. For some reason my version of Craft came with a 'htaccess' file without the . in front of its filename. I added that and now everything works exactly how I wanted it!  
  > **username_1**: Ahh ok, that's how they ship it and you have to rename it manually. See http://buildwithcraft.com/docs/installing#step-1-upload-the-files. I think it's because dot files are hidden by default, so they make sure you find it.  
  > **username_0**: Yes, you're right. I should've known this. I've read that before and actually done it, haha.  
  
  ---
  
  