I'm trying to get a simple front controller for routing set up. This is the front-controller.php file I have:
<?php
if ($_SERVER['REQUEST_URI'] == '/help') {
include 'help.php';
}
this is a .htaccess file I have in the folder with my index.php (which is under htdocs/wad)
RewriteEngine On
RewriteRule . /front-controller.php [L]
In httpd.conf
I changed all instances of the AllowOverride None
line to AllowOverride All
and I uncommented the LoadModule rewrite_module modules/mod_rewrite.so
line.
I am getting Error 404 if I try to go to localhost/wad/help and even localhost/wad: http://puu.sh/cE6WT/2e4c645555.png
The help.php file exists. I want to be able to browse to localhost/wad/help and have it load (in the same page, not redirect to it). Am I going about this the wrong way?
Thanks