2

Craft newbie here. I have been playing with craft now for a few weeks and built out a couple of pages. I am really liking it this CMS. The one small problem that I just noticed however, is when I tried to go to the news template (for example) by going to http://example.com/news I get a 404 error. It works fine when going to http://example.com/index.php/news.

Am I missing something or does the index.php always need to be in the address?

When I read the documentations it says either way would work, so I am sure I am doing something wrong or missing something really simple.

I would appreciate it if someone can point me in the right direction.

  • 1
    This can happen if the '.htaccess' file in your public folder is not configured properly. Can you post the contents of your .htaccess file, and describe the relationship between your public folder and the craft folder (i.e. is the 'craft' folder one level up from your 'public' folder)? Might also check this doc article and this post and this post or just do a search for 'index.php' on this site in general. – Douglas McDonald Apr 15 '15 at 1:38
  • Hi Douglas, you were right, it was the .htaccess file. Apparently the period was left off the filename when it was first installed. I knew it was something simple lol. Thanks again for your help! – Vince M. Apr 15 '15 at 13:18
  • 1
    Great! Glad you found it. If I remember correctly I think that it comes like that on purpose, so that the file doesn't instantly disappear in your finder window as an invisible file. Happy crafting. – Douglas McDonald Apr 15 '15 at 16:11
5

The .htaccess file was missing the period in the filename when initially installed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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