Running from subdirectory

Dear Kirby-Forum!

Sry for bringing up this topic, but unfortunately the older / other answers did not help.

Usually I am running my dev-projects locally, pushing them to mysite.com/clientname later to show them to the client.

On the Server I created a subdirectory called clientname, where I put the all files.
I further updated the .htaccess to RewriteBase /clientname (this is everything I changed there)

In another thread I read you could (or should?) update the config.php as well, so I included c::set('url', 'http://www.mydomain.com/clientname');

I tried the .htaccess in the root directory as well as the /clientname directory.

But unfortunately I am just getting an HTTP ERROR 500.

Any ideas?

Thanks in advance

Is mysite.com also a Kirby installation?

No, there is cms-less website (i am designer with an eternal holding page :wink: ).

I would normally suggest using subdomains (ie: clientname.mysite.com) for this, to prevent any settings / configurations leaking through. Is that an option for you? Just be sure you adhere to Kirby licensing terms.

I agree with @jimbobrjames.

However, what is in your root .htaccess at the moment if there is one?

What is in. your Kirby .htaccess?

first: thanks for your quick reply.

in the root directory there is none. however, I tried to put one there, did not help.

In my kirby .htaccess is
RewriteEngine on
and
RewriteBase /mister

I did neither include anything else nor change or uncomment another line.

in the kirby .htaccess there is another uncommented line, which i commented out (ha, how do you say that :thinking:) as well, did not help either.

# In some enviroments it's necessary to
# set the RewriteBase to:
#
RewriteBase /mister

I also had a look at the documentation where it reads (at least for panel 500 issues) one should have a look into php md string stuff. but this is just locally right?

What kind of hosting is it? Shared? VPS? Something else?.. it might be there are things missing and you may or not have the rights to install them, this is usually true of shared hosting.

yeah it’s shared hosting.

btw thanks for suggesting subdomains. will give it a try.

will search my way around the documention and forum on setting this up…

Is rewriting enabled on the server?

Does it read the .htaccess at all?

hmm… how can i find this out? :thinking:

You could check your PHP info.

Create new PHP file with

<?php

phpinfo();

into the root folder open in browser.

But is the Server an Apache server at all and what is your PHP version?

ah of course.

jep, it’s an apache server :wink:

php is 5.3.3.

That version is too old. Min requirement is 5.4, ideally 7.x. That’s why it doesn’t work.

ah oh no? really? ok, will update. sry for bothering you with this foolishness, could have thought of this myself…

Well, me too, but these days I hardly ever think that someone could be using such an outdated PHP. version

If you log into your hosting control panel, there might be a method to pick the version of PHP you want to run. Since you are using a subfolder though, changing will effect the main site above it.

This is another reason for using subdomains, since the php version can (usually) be set independently.

That depends on the hosting, you can’t do this everywhere.

And maybe the main page doesn’t use PHP at all, so then this is no issue.

But using subdomains is in fact the cleaner alternative.

You were too quick, i was still typing :slight_smile: