<p>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! </p>

CC BY-SA 3.0
2015-07-30T20:33:07.623Z
2015-07-30T20:33:07.623Z
user3259420
<p>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. </p>

<p>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! </p>

CC BY-SA 3.0
2015-07-24T21:58:31.023Z
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)?
Brandon Kelly
CC BY-SA 3.0
2015-07-25T02:00:25.857Z
Can you access the cp? - to update: System->General->SiteUrl
and any assets urls affected
j00lz
CC BY-SA 3.0
2015-07-25T16:33:36.563Z
You should also look at the .htaccess rule for the URL rewrites.  You may need to set the basepath
Steve Adams
CC BY-SA 3.0
2015-07-27T05:31:53.763Z
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?
user3259420
CC BY-SA 3.0
2015-07-27T05:39:04.247Z
*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...
user3259420
CC BY-SA 3.0
2017-09-05T00:39:59.290Z
I have the same problem but the answer below won't work for me. I created a new .htaccess in the /subdirectory/ root folder (which contains both the 'craft 'and 'public' folder. I changed the basepath in that .htaccess to /subdirectory/public, and left the other .htaccess files unchanged. Foler permissions look right. I'm on MediaTemple grid, so I'm not sure I can change my user/group settings.
David Rhoden
<install><redirect><404>
I moved my craft site to a subdirectory, and things are broken now, help!
# I moved my craft site to a subdirectory, and things are broken now, help!

(Asked by: username_0 on 2015-07-24)

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!

**Tags:** install, redirect, 404
> **Comments:**
> **username_1**: 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)?  
> **username_2**: Can you access the cp? - to update: System->General->SiteUrl and any assets urls affected  
> **username_3**: You should also look at the .htaccess rule for the URL rewrites.  You may need to set the basepath  
> **username_0**: 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?  
> **username_0**: *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...  
> **username_4**: I have the same problem but the answer below won't work for me. I created a new .htaccess in the /subdirectory/ root folder (which contains both the 'craft 'and 'public' folder. I changed the basepath in that .htaccess to /subdirectory/public, and left the other .htaccess files unchanged. Foler permissions look right. I'm on MediaTemple grid, so I'm not sure I can change my user/group settings.  

---

## 1 answers

### Answer by username_0 on 2015-07-30. Score: 2

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!


---

