Hello everyone!
I’m building a page with Kirby and it’s working like a charm on my local MAMP but when moved to Apache 2.4, no page except for home is working.
All I get is ‘The requested URL /XXXX was not found on this server.’
The module mod_rewrite is enabled
Half a kingdom for a solution
here is my htcaccess
# Kirby .htaccess
# rewrite rules
<IfModule mod_rewrite.c>
# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on
# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
RewriteBase /
# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
# block all files in the site folder from being accessed directly
RewriteRule ^site/(.*) index.php [L]
# block all files in the kirby folder from being accessed directly
RewriteRule ^kirby/(.*) index.php [L]
# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]
# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on
Haha, I tried it both ways so the comment is still relevant.
This line has been commented, uncommented, set to /, blank, /kirby etc and it’s all the same issue at the end of each try
Yep, I do: any hints on what I should look for there?
I was thinking about the c::set before, but I’m not sure whether that will be a good solution if I am planning to do subdomains from the folders like this:
You can check if your httpd.conf allows overriding:
AllowOverride All
What are those folders? Are they different Kirby installations? Or do you use a multi-site setup?
If those folders are all separate Kirby installations and you point your subdomain to one of them, you can use that subdomain in your config without any problems (if it solves the problem, that is)
Edit: You could also just write some nonsense stuff into your .htaccess. If you get an internal server error, the .htaccess is not ignored.
Tried it out: you were right about the server ignoring the file altogether.
The AllowOverride setting didn’t fix the problem, but here’s what did: getting rid of .htaccess altogether and putting the settings into server configuration – Apache can and prefers to roll without .htaccess
Thank you for your help, texnixe, you get quater kingdom and a horse. Can ship via DHL