Panel not working on server. htaccess/cache/language versions issue?

Hello,
I got stuck on some htaccess/cache/language versions issue I guess?
Site is working properly on local MAMP with all subpages and panel, all good.

when uploaded on server I got issues with some language versions of subpages and/or with panel.
http://starterkit.arste.com

Using kirby 2.4.1 thru download and there is php 5.6 running on server.
it is running on the subdomain and it is located root/starterkit/…
checked .htaccess and url in config.
c::set('url', 'http://starterkit.arste.com');
RewriteBase / is functional for the public part of the web.

when I get to panel login / I get the login window. now “Error/page has not been found”

my .htaccess

# 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 /mysite

# In some enviroments it's necessary to
# 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
# except for requests to plugin assets files
 RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$ site/plugins/$1/assets/$2 [L,N]
 RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
 RewriteRule ^site/(.*) index.php [L]

# block direct access to kirby and the panel sources
 RewriteRule ^(kirby|panel\/app|panel\/tests)/(.*) 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

I tried deseprately any related solution I found in the forum which ended with removing all blocking mechanisms (doublequoted below)

## RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
## RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$site/plugins/$1/assets/$2 [L,N]
## RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
## RewriteRule ^site/(.*) index.php [L]
## RewriteRule ^(kirby|panel\/app|panel\/tests)/(.*) index.php [L]

I was trying to add options (not really sure of what they are doing)

Options +FollowSymLinks
Options -Multiviews

perhaps it has to do something with my language settings since one language has
root/ and second has root/cz/ in address?

what am I messing up?
anyone can help?
thank you!
Jaro

What (apart from the Panel) does not work as expected? The subpages seem to work correctly, don’t they?

In the latest setup it seems to be almost ok.
Might be unrelated - I get issues as well with the blog in one of the languages.

Have you made sure that all text files in all folders have the correct filename using language extensions, home.en.txt, home.cz.txt, etc. and that there are no extra text files?

Could you try to remove the URL setting in your config.php, this is usually not necessary.

It is not recommended to comment out the default Kirby rewrite rules.

I double checked the existance and structure of the files,
they do exist. I can make them and edit in panel on local even in both languages and it does work and display properly on local.

# Kirby .htaccess

Options +FollowSymLinks

# 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 /mysite

# In some enviroments it's necessary to
# 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
# except for requests to plugin assets files
RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$ site/plugins/$1/assets/$2 [L,N]
RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
RewriteRule ^site/(.*) index.php [L]

# block direct access to kirby and the panel sources
RewriteRule ^(kirby|panel\/app|panel\/tests)/(.*) 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

then config with languages

c::set('languages', array(
  array(
    'code'    => 'en',
    'name'    => 'English',
    'default' => true,
    'locale'  => 'en_US',
    'url'     => '/',
  ),
  array(
    'code'    => 'cz',
    'name'    => 'Česky',
    'locale'  => 'cs_CZ',
    'url'     => '/cz',
  ),
));

c::set('language.detect', true);

c::set('debug', true);

Interestingly, when I load http://starterkit.arste.com/panel/login, that URL works, whereas ``http://starterkit.arste.com/panel` does not redirect to the login page but to the error page.

What other pages do not work as expected?

it does redirect in my case.

Originally I got in troubles with blog page on the frontend, and then I am having issue in the panel with edit/save and such.

http://starterkit.arste.com/cz/blog
is not working
sometimes a page is not working when you try access first time, then second time it works.

This is really strange. Are you using any routes? Any plugins? Have you tried with removing all these additional options?

Edit. Looks like you have hosted a second project on the main domain, which seems to be working correctly?

I found I had php 7 version on my local, whereas there is php 5.6 on the server, so I tried clean install of kirby on the server and install of panel directly on the server. Frontend is ok (not the blog) if this can be leading to identification of the problem. This web is single language and it still does problems in the panel. Edit is not working. Sometimes it loads the page, sometimes not. This “sometimes” bugs me the most. Can I switch of some cache options or something?

Have you enabled caching in your config.php file? If not, Kirby does not cache anything by default.

Maybe your hosting provider has some sort of caching enabled? Maybe you should contact them for help?

I did not set any caching, and from what I could find quickly hosting is not caching…

I’ll close this for the moment as it is probably server related.

I have uploaded on different hosting with PHP 5.7 and friendly support set all according to Kirby recommendations and it all works smoothly. Not sure what setup was wrong on the previous one. It was PHP 5.6 and unfriendly support perhaps the bad spirit was spread over. Thanks texnixe for support and cheering up!