Issue with my .htaccess

Hey There,

first i warn u for my bad english. Sorry Guys.
I want to launch my website on a subdomain to test a few things.
I uploaded kirby and my project finally to my webspace. So when i join my site i see my first page but if i click on a site link in my navbar then i get these error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

I googled a little bit and i think it has to be something with my .htaccess doc. The files in my webspace have all the permissions 755, is this right?
Can someone know this problem or could help me?

Greetings
Florian

Have you made sure, your .htaccess file is in fact on the server?

If so, is your project in a subfolder of your server? Then try setting the rewrite base to the subfolder in your .htaccess:

RewriteBase /my-subfolder

If that doesn’t help, check if the rewrite module is enabled on your server.

If the rewrite module is enabled and your site is not in a subfolder as @texnixe mentioned, it could also be necessary to set the RewriteBase, if it’s a shared hosting.

RewriteBase /
2 Likes

Thanks for your replys. My website is only on a subdomain like http://web.example.de
Its not i a subfolder.

Thats my .htaccess

# Kirby .htaccess

# rewrite rules
<IfModule mod_rewrite.c>

# enable awesome urls. i.e.:
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 
# Set the RewriteBase to:
#
# RewriteBase /

# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ error [R=301,L]

# block all files in the site folder from being accessed directly
RewriteRule ^site/(.*) error [R=301,L]

# block all files in the kirby folder from being accessed directly
RewriteRule ^kirby/(.*) error [R=301,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

Have you tried to set the rewrite base like @flokosiol suggested?

1 Like

@texnixe Ehm, omg thanks :slight_smile:
Sometimes i could hit my head myself :-//

I missed to delete the # before RewriteBase /

Thanks for your help guys :slight_smile:

If it works now, everything is fine :smile:

i think i had a similar problem:

i run Kirby in WAMP
C:\wamp\www

but subpages are Broken. I change the # RewriteBase /
to:
RewriteBase /
RewriteBase/
but nothing changes.

Someone has any idea what am doing wrong?
Thanks
Panagiotis

Is the apache rewrite_module activated in your httpd.conf ?

1 Like

no, it wasnt. now its work fine.
thanks texnixe

@texnixe:
Is this (“apache rewrite_module activated”) a nice to have at the docs at http://getkirby.com/docs/installation/troubleshooting???

1 Like

This worked for me. I just put it in an htaccess file and vwala.