PHP routing not working

I have a header as php include and routing assigned to each nav-link but its not working. i get 404 error.
what could be wrong? i could not debug on this.

What server model are you using? Can you paste the content of the .htaccess file here?

PHP server model with apache,

here is .htaccess content:

## 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 ^/?services(?:/)?$ services.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?contact(?:/)?$ contact.php [QSA,NC,L]
## End Wappler routing

That looks good. Has that definitely uploaded to the server?

Yes, i did. but strange routing is not working. its IONOS VPS hosting.

Wappler doesn’t do anything fancy, it’s all just the .htaccess file. Maybe do something obvious in that file to make sure it’s being processed?

https://docs.boltcms.io/5.0/howto/making-sure-htaccess-works

2 Likes

Thanks and let me test

I found the issues on the server, it was not reading .htaccess file because of wrong php server configuration and i have corrected that. it works now :slight_smile:

Thanks and appreciate @sitestreet

1 Like

That’s good to hear. Well played.

Great reference on htaccess ! :grinning:

1 Like