I installed craftcms on a regular .com root folder, and everything worked fine. I can go to .com/news and it will go to my /templates/news.html file, etc.

Now my client wants their site on a subdirectory. I copied over all the files to the new subdirectory, but now when i go to .com/subdirectory/news, I get a 404 page. I checked that the .htaccess was correct, I just don't know what else I have to change to make the new site work on the new subdirectory. Please help!

  • 2
    Do you get a Craft-styled 404 page (gray background with white box in the middle), or Apache (white background with Times New Roman text)? Jul 24 '15 at 21:58
  • 2
    Can you access the cp? - to update: System->General->SiteUrl and any assets urls affected
    – j00lz
    Jul 25 '15 at 2:00
  • 2
    You should also look at the .htaccess rule for the URL rewrites. You may need to set the basepath Jul 25 '15 at 16:33
  • I get a Craft style template 404 (white background, red box). I have updated the SiteUrl and it effects all my assets, but it does not work on template htmls. I have a feeling there is something I need to change in the database... is there anything there besides SiteUrl? Also, what did you have in mind for .htaccess basepaths? Jul 27 '15 at 5:31
  • Update When I got to www.site.com/subdirectory/test ...it gives me a 404 page template from www.site.com/templates/404.html, not www.site.com/subdirectory/templates/404.html. the subdirectory has it's own .htaccess but it doesn't seem like it's affecting anything... Jul 27 '15 at 5:39

So I figured it out! my htaccess did not have the "." in front of them. So my htaccess in my subdirectory was not being read. Once I renamed it to .htaccess, it worked fine!

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.