I am very new to Craft and have only been working with it for a few hours. However, I am stuck with something I can't seem to figure out.

I understand the basics of templates, of which I have an index.php using % extends "_layout" % Then I created a new Section with the Section Type set as Single for About. Craft sets the Entry template to about and I have the URL set to be about. Then I create a new template file called about.html.

However, the problem comes when I go to view it on localhost/about as I get the following message;

The requested URL /about was not found on this server.

But when I navigate to index.php/about it is there. I'm confused as to why the architecture of the URL is set up this way as on a normal website you would'nt have index.php/ before every other page on your site.

Is this fixable?


It sounds like you haven't set up your .htaccess file or have failed to rename it. The file in the default set up doesn't have the . at the start.

Read https://docs.craftcms.com/v2/installing.html carefully. The bit concerning htaccess is just before step 2.

Also ensure you're files are in the right place.

  • My htaccess file is .htaccess and contains the text 'deny from all'
    – Al-76
    Sep 1 '18 at 13:11
  • @Al-76 that's probably the wrong .htaccess file. You need to have a .htaccess in the public folder. Sep 1 '18 at 14:32
  • @AbbeyDesign Thank you very much for pointing that out. I have updated this one and the URLS are now correct.
    – Al-76
    Sep 1 '18 at 14:42

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.