Problem with SPA/route on PHP site

Hi I got a problem with SPA and route I have a testsite that is working with route and this is it
https://tester.howden.no/

If I press the menu “Andre” I get the right response …

https://tester.howden.no/andre

But the problem is when I press F5 or refresh the page I get a 404 error.

I have tried the “links relative to” “site root” but it doesnt change anything.

Any ideas is appreciated.

How have you setup routing on your page and in the routing panel? Please post some screenshots.

Here is the routing picture
bilde

Her is the index.php page

I suppose you probably use Apache as server. Check the file .htaccess in the root of your project is uploaded to your server. If it was uploaded then please post the content of that file here.

The .htaccesss file on apache server look like this.

## Wappler routing
RewriteEngine On
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?andre(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?brukere(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?tull(?:/)?$ tull.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?tull/test(?:/)?$ tull.php [QSA,NC,L]
## End Wappler routing

I don’t see directly anything wrong, do the rewrites work when you use the urls in the browser? So does the problem only exist when you refresh the page?

If I try to put in “tester.howden.no/andre” directly in to the browser or if I refresh the page I get the same result. A 404 not found.

Could this be any settings in apache. I use several websites on the same apache server.

When the direct url also is not working then it is definitely something with the htaccess file. Double check if the file was indeed uploaded to your server. Are you sure that your host is running apache on the server, for IIS we generate a different routing file and nginx isn’t supported.

Yes it is running apach and the file is uploaded.