Error 404 Object not found! before start to handle URL on index

  .htaccess, model-view-controller, php, windows, xampp

Error 404 Object not found! before start to handle URL on index

I did my own MVC project and all request are handled right except when I go to error page.

URL format: http://project/controller/action

Edit: If i go to http://project/error, everything is fine, the controller exists and is created correctly.

The problem is only if i go to http://project/error/whatever (e.g: http://project/error/pageNotFound), throws me: Object not found! … Error 404 before to start execute my index.php. I did:

die("first line execute");

And throws error 404 first, doesn’t matter if the action exists or not, i can’t handle URL.

┬┐Perhaps its an .htaccess error? Because nothing execute. I’ve got this:

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?url=$1 [L]
</IfModule>

I don’t know, thank you very much for your time.

Edit 2: Tested with xampp (VirtualHost) on windows 10


Source: StackOverflow

LEAVE A COMMENT