# Kirby and sub domain

**URL:** <https://forum.getkirby.com/t/kirby-and-sub-domain/2218>\
**Category:** Questions\
**Tags:** v2\
**Created:** [October 13, 2015, 5:35am UTC](https://forum.getkirby.com/t/kirby-and-sub-domain/2218 "2015-10-13T05:35:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hardboiled](https://avatars.discourse-cdn.com/v4/letter/h/7cd45c/32.png) [@hardboiled](https://forum.getkirby.com/u/hardboiled)\
**Post date:** [October 13, 2015, 5:35am UTC](https://forum.getkirby.com/t/kirby-and-sub-domain/2218/1 "2015-10-13T05:35:01Z")

</div>

Hi,

I am struggling for a while with .htaccess file for the RewriteBase issue.  
I put kirby in a folder (named kirby) of my root server and I created a sub domain (kirby.mydomain.info) which redirects to this folder.  
In .htaccess file I put `RewriteBase /kirby` but it doesn’t work.  
The homepage is OK but when trying to go to some contents (other pages) I got an error server notice.  
You can see the homepage [here](http://kirby.polar-hardboiled.info) _(please note that it’s not a production site just a test before migrating my own site to kirby cms)_

I didn’t find something heplful in the other topics related to subdomain in this forum.  
Therefore if you have any idea or helpful method  
Thank you

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [October 13, 2015, 7:56am UTC](https://forum.getkirby.com/t/kirby-and-sub-domain/2218/2 "2015-10-13T07:56:04Z")

</div>

Your subdomain is set to the /kirby folder, so from the point of view of the subdomain, your Kirby install is not in a subfolder but in the subdomain root. Try uncommenting the RewriteBase, or set it to “/”.

---

<div class="post-metadata">

**Author:** ![hardboiled](https://avatars.discourse-cdn.com/v4/letter/h/7cd45c/32.png) [@hardboiled](https://forum.getkirby.com/u/hardboiled)\
**Post date:** [October 14, 2015, 3:00am UTC](https://forum.getkirby.com/t/kirby-and-sub-domain/2218/3 "2015-10-14T03:00:59Z")

</div>

Thank you, it works perfectly with RewriteBase “/”

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:04pm UTC](https://forum.getkirby.com/t/kirby-and-sub-domain/2218/4 "2025-02-06T17:04:24Z")

</div>


