Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

The startpage of q2a is ok, but click on any link gives "The requested URL /... was not found on this server."

0 votes
asked Dec 3 in Q2A Core by Andreas
We have changed the server of our q2a installation: forum.kivitendo.ch

As far as I see, everthing is as is was before.

However only the startpage of q2a is shown correctly. When I click on any link like Login oder Aktivit├Ąten, I get a 404 server error:

The requested URL /login was not found on this server.

The requested URL /activity was not found on this server. etc.

mod rewrite in apache2 is enabled

I didn't change the standard .htaccess-file:

Options -Indexes
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]

Any idea, what could be wrong?

Thanks for any help

Q2A version: 1.8.1
commented Dec 3 by fara
Did you change the Preferred site URL?
commented Dec 3 by arevamp
moved Dec 3 by Scott
Where do I find the "Preferred site URL"?

On the old server we used https://forum.kivitendo.de:32443 and now https://forum.kivitendo.ch

Where in the code or in the database do I have to change this?

commented Dec 3 by fara

1 Answer

+2 votes
answered Dec 3 by Scott
It sounds like the htaccess is not working correctly. Check that in your server settings you are allowing htaccess to be used. You should have "AllowOverride all" in there.

You can also go to yoursite.com/index.php?qa=admin/general to view the admin page and you'll see under "URL structure" whether the friendly URLs are working (it will have OK next to it if it works). You can temporarily set it to a lower one so the site works again.
commented Dec 3 by arevamp
Hi Scott
Thanks a lot, "AllowOverride all" was the solution, everything works fine again!