How to create PHP router with AJAX support?

I have a pretty simple router, which gets url $_SERVER[‘REQUEST_URI’] and checks and includes php scripts. And when I send a http-request, my URL goes my router just returns me 404 error, because it cant recognise /login in this url.

Can you post the code? It’s a bit difficult to diagnose without.

are you sure you get 404 from the router and not from the webserver? must have something to do with the mod_rewrite or with your routes.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.