I am trying to right a basic controller that all requests get redirected through. I have made a simple Slim app that runs in this controller, and I keep getting the dreaded slim ‘Page Not Found’ page. Have gone through a ton of Google searches and none of the answers fix my problem. Finally decided to post in here.
This is my basic Apache Conf, and mod rewrite is on.
So everything should be redirected through the controller script in the web root directory.
controller.php looks like this:
<?php
require_once( DIR . ‘/config.php’ );
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
I know this script is getting called because I can do a “print_r($_SERVER); exit;” and see the output. But for some reason my route is not being registered.
Yes, the last slash I have tried to remove as well. Does not work. The page loads fine, there are no syntax errors. The two underscores don’t show here, but they are there. _ _ DIR _ _.
The rewrite rules you have shown are what I have.
The only thing I can think of is that I am using this as a virtual host. Would that have any impact?