I’ve built a portfolio site with Kirby, and in connecting it to my hosting, I am realizing that the main “home” page I made is not available at the path I need it to be and expect it to be.
When I navigate to mydomain.com, I need to see the main portfolio page, but the screen is just blank. Instead my this screen is available at mydomain.com/portfolio.
Similarly, I need its children (the portfolio’s project pages) to be available at mydomain.com/project-A (for example), but it can only be found at mydomain.com/portfolio/project-A.
(This is not a new problem, it was this same way in my localhost, but I thought I might fix it more finally when I connected to hosting, so waited until this point…)
Here is the folder structure of my content folder:
/content
/site.txt
/error
/error.txt
/portfolio
/portfolio.txt
/project-A
/project-A.txt
/project-B
/project-B.txt
I re-downloaded the starter kit to compare its behavior, and the behavior of the example content it comes with is exactly what how I need mine to be! I cannot figure out what is different between the starter kit setup and mine: I have compared the .htaccess files and site/config/config.php files (identical; nothing modified in any) and looked for routing in the starter kit but can’t find any. (I have the latest Kirby update.) Mine has no routing, and I’d prefer to solve this without it, using whichever simpler method is happening with the starter kit.
I had originally thought it was something to do with with the structure of my content folder, but the starter kit has a similar structure (as far as I can tell), wherein the home page is directly inside the content folder… HOWEVER, when visiting the starter kit’s home page on localhost, the path is simply my localhost URL prefix without a “/home” suffix. Strangely, when I visit pages that are adjacent to this home page in the starter kit’s content file, their URLs are appended with their /pagename, e.g. “/blog”. Here is an abridged version of the starter kit’s content structure for comparison (only showing blog as example adjacent page):
/content
/site.txt
/2-blog
/blog.txt
/blog-post-a
/blog-post-a.txt
/error
/error.txt
/home
/home.txt
For the life of me, I cannot figure out how the starter kit gets its home page to appear at the root URL without needing to be appended with “/home”.
Can anyone enlighten me?