Subpages problem after installing through FTP

Hi there,
I just installed Kirby on a server through FTP.
I’m trying to point a subdomain to it (ex. http://subdomain.domain.com)
I activated RewriteBase / in .htaccess

But :

  1. My homepage looks perfect
  2. Every link I click on creates a weird dumbed-down version of my HP (and not the /page expected)
  3. when I click on more links, their name seems to get added at the end of what’s already in the address bar.

Even though everything worked fine locally…

It’s not my first installation of Kirby but this time, I have no idea what’s happening…
I’m using some hosting called Nordnet for the first time…
Could it be that .htaccess isn’t read by the hosting service ?
Any help welcome !
Thanks

— edit +8min

I’m wondering of my .htaccess is being read at all. Filzezilla won’t let me change the access rights to it (666 at the moment). Here’s what the server bounces back : 550 .htaccess: Permission denied

You can easily test this by putting this line at the top of your .htaccess

deny from all

If the file is read, you’ll get a 403 forbidden on all pages in that folder

Hi @texnixe
It seems to ‘work’ because I’m getting a Forbidden message…

Have you checked if mod_rewrite is enabled on the server?

I’ve added RewriteBase / in .htaccess but how can I check if mod_rewrite is enabled ?
I know I’m using PHP 5.4

Put a new php file (e.g. info.php) in the root of your folder just with the following command:

phpinfo();

You can even put that in the index.php if you want.

Then open that file in a browser and use search for mod_rewrite, it should be listed in the section “Loaded Modules”

Thanks @texnixe
I do get a list of a lot pf PHP settings, but mod_rewrite is nowhere to be found…
I don’t even have a ‘Loaded modules’ section…

Sure? Should look like this:

Here’s what I get :
http://portraits.corpoe.com/info.php

Hm, ok, this is not telling me much …

I can remember that I once had a similar problem on a server or I read about the same problem and I think it was a problem connected with mod_rewrite. But I’m afraid I can’t help you any further with this :pensive:

Aaaarg…
Thanks @texnixe :wink:

Hello – running your site in a subdomain usually shouldn’t need any .htaccess fiddling at all – only for subfolders.

I just visited your site and it works – I suspect, you simply experienced a slight delay on putting up your new .htaccess – depending on the configuration, it can take some minutes for the changes to be up; sometimes changing the browser for testing helps, too.

Hi @Stolzenhain,
I checked the site on different browsers, clearing my cache and all, and it still doesn’t work.
Every link brings me to a dumbed-down version of the homepage (with less CSS and broken images links)…
I have no idea what’s happening…

OK, I finally managed to get in touch with my hosting provider.
(btw, I don’t recommend using Nordnet, they’re total crap).
And it seems the mod_rewrite PHP module is not activated and there’s no way to activate it…
So that leaves me there…

Hmm – this sounds very uncommon, but if support says so … You should definitely change your hoster.

A lot of CMS have the possibility to turn off the rewrite option and serve raw PHP requests. Don’t know about Kirby though – on second thought, this practically undetermines the whole Kirby functionality, so I doubt it.

Also, you were right – the files that got displayed correctly were CSS modules served by a CDN, so not pointing to your server.

Kirby actually does work without mod_rewrite enabled. Simply set c::set('rewrite', false); in your config.php and Kirby will generate links containing index.php at the beginning. Unfortunately, this currently does not work with the Panel.

Aha! Good to know – one should be checking the configuration list in the docs from time to time.

I tried this a while ago and found it not working Kirby 2 without .htaccess?, was no problem with Kirby 1, but for Kirby 2 mod_rewrite is a requirement http://getkirby.com/docs/installation/download

… ok, I tested this and indeed, Kirby returns only paths like /index.php/projects/abc whereas a site without mode_rewrite should get something like index.php?q=projects/abc to process.

(Edit:) the follwoing answer suggests this works anyway

Yes, but only if using the Panel. The core works beautifully without rewriting.

Yes, that’s intentional. I tried deleting the .htaccess in a test installation and set the rewrite option to false. The /index.php/projects URL works just fine, as Apache passes any additional path info after an existing file to that file. Doesn’t it work for you? If so, what server does your hoster use?