When first posting this, I didn't understand the problem. When I removed the index.php from the urls with a .htaccess file (http://ellislab.com/expressionengine/user-guide/urls/remove_index.php.html), all the templates other than the homepage all gave 404s.


I've create a list of the channel entries, but when you click on a link it sends you to the url example.com/title-permalink= and throws up a 404.

I've tried to visit the single entry pages by manually putting in the url but it doesn't work either.

Here's the simple code on the index page.

   {exp:channel:entries channel="essays"}
      <li><a href="title-permalink="site/essay"}">{title}</a></li>

And the single entry page.

{exp:channel:entries channel="essays"}

I haven't had this problem before. It seems like it must be really simple. What am I missing? Something in the settings?

  • UPDATE Just did a fresh install and repeated the setup and everything, trying to figure out when it went wrong. It's when I removed the index.php from the urls. ellislab.com/expressionengine/user-guide/urls/… I tried the recommended exceptions, but with no luck. All templates were bringing up 404s except the homepage. Just as described at the bottom on the instructions. It's happened both on locally with MAMP and on Bluehost. Commented Jun 23, 2014 at 17:16
  • I found these questions that seem to fit the problem. expressionengine.stackexchange.com/questions/4954/… Commented Jun 23, 2014 at 17:19

3 Answers 3


You are missing the opening { on the href's tag, and {title_permalink} has an underscore _ not a dash.

<li><a href="{title_permalink="site/essay"}">{title}</a></li>

See EE Docs on Permalinks

  • Thanks. Always the little things. The links now points to the right url (like example.com/site/essay/my-first-post) but the single entry page still doesn't come up. It gets a 404. Commented Jun 20, 2014 at 1:29
  • @Nathaniel do you have a site.group template folder with a essay.html template in it? Commented Jun 20, 2014 at 1:35
  • Yes, template group "site" and the templates "index" and "essay" within. Commented Jun 20, 2014 at 1:39
  • Is your .htaccess file configured? What happens when you visit /index.php/site/essay? Commented Jun 20, 2014 at 1:56
  • I only set up the .htaccess to remove index.php from the urls. I get a 404 when I visit index.php/site/essay. Actually I get a 404 when I try and visit any template other than the home page. Maybe that's the real problem... Commented Jun 20, 2014 at 13:34

On single entry pages that aren't throwing 404's EE is falling back to the template group's index.html page.

To fix:

Add this to the top of your detail page template. Adjust the segment to a number AFTER your URL Title displays:

{if segment_3 != ""}

And on single entry pages you should do this to trigger 404's when EE can't find an entry so that it does not fallback to the index.html template in the template group. Adjust the segment to your URL Title segment:


Finally, add these to your .htaccess file (where /index.php/site/404 points to your 404 template):

ErrorDocument 404 /index.php/site/404

<FilesMatch "(\.jpe?g|gif|png|bmp|css|js|flv)$">
  ErrorDocument 404 "File Not Found"

That should do it!

  • 1
    Just curious - why turn dynamic off and force url_title on a single entry template? Commented Jun 20, 2014 at 12:08
  • I copied this code from a recent 2.8.1 project. For some reason "require_entry" was super finicky and wouldn't work without explicitly setting the URL title as a parameter. Commented Jun 20, 2014 at 16:26
  • It's not just the single entry pages, it's every single template other than the homepage. I went through the install, setup process again to figure this out. It's when I removed the index.php. ellislab.com/expressionengine/user-guide/urls/… With the problem better understood, I'm searching around for answers. Commented Jun 23, 2014 at 17:48

The real problem: After trying to remove the index.php from the urls with a .htaccess file (http://ellislab.com/expressionengine/user-guide/urls/remove_index.php.html), all the templates other than the homepage all gave 404s. I looked around, tried lots of different versions of the .htaccess code, and this one it worked. https://expressionengine.stackexchange.com/a/871/3177

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^/index.php
RewriteCond $1 !.(css|js|png|jpe?g|gif|ico)$ [NC]
RewriteRule ^(.*)$ index.php/$1 [L]

It worked on both my local build with MAMP and my hosting on Bluehost, both in sub-directories.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.