How to get a URL from a subpage

That was not the question. I wanted to know the URL of your homepage.

for testing i uploaded it here:
http://simpson_johnson.alexanderboenninger.de/legal_notice
unfortunatly, does not even show the error page

You don’t want to answer my question, do you?

In any case, there is something not working with your URL rewriting. The generated URL is fine on your remote server. On the remote server, you might have to set the RewriteBase in your .htaccess, probably to /.

But that doesn’t explain why it doesn’t work as expected locally, because in a Mamp environment, you usually don’t have to make any modifications to the .htaccess. But maybe it is ignored due to your Apache settings (or are you using Nginx locally?).

Sry. i tryed. but i don’t know which URL could mean, after those i gave you. :grimacing:
So which URL do you want to know?

well, i used node for an other projekt recently. Not shure if that can effect the kirby structure.
So you think i have to change something in the .htaccess – there is nothing written about RewriteBase just mod_rewirte.
here what it says:

As-MacBook-Pro:~ a$ /Users/a/path/starterkit-master/.htaccess ; exit;
/Users/a/path/starterkit-master/.htaccess: line 4: syntax error near unexpected token `newline'
/Users/a/path/starterkit-master/.htaccess: line 4: `<IfModule mod_rewrite.c>'
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...40 completed.

[Prozess beendet]

I meant the URL of your home page, assuming that the homepage of your local project works. The full URL you see in your browser’s address bar with the home page open on localhost.

Now i am embarrassed. :joy:
maybe now i unterstood.

when i just start the site: this is standing in the adressbar:

Yep, that’s all I wanted to know. So the URL for the page is fine.

But as we can see, subpages are not working.

Since the .htaccess file is there, let’s see if it works at all. Put some random characters at the top of the file and save. If your site breaks, that’s a good sign.

If not, are you using Apache at all? Or Nginx?

Yeah. Now the site is not working at all.

Perfect. Then that works as expected as well. You can now undo this.

Do you redirect to the error page anywhere in your templates (go('error'))?

Yes in the default.php.
A few weeks ago i build the onepager according to this description: One-pager site | Kirby CMS

OK. I just removed it from the default, now it is working.

I am really sorry, it is my first kirby project. :tada:
What a day. Thanks for your wonderfull support!

I suggest you use a different template than the default template for the legal notice and other pages you want to access, but keep the redirect to the error page in the default.php template.

You can achieve this by creating a new template and giving the text file in the legal_notice folder the same name as this new template, e.g. /site/templates/legal_notice.php and /content/legal_notice/legal_notice.txt

Oh, but that is how i have already done it. see the screenshots from before. (post#9)
And right now it is not working, when in the dafault.php redirect to the error page…

I saw the template, but have you checked if your text file also has the correct name? Kirby falls back to the default.php template only if it cannot find a template that fits the content file name. Can you show me what is in the /content/0_legal_notice folder?


But somehow it is working now. Also with the go ("error") in default.php.