I have a simple script:
index.php:
<?php
$path= $_SERVER['PATH_INFO'];
if($path)
echo $path;
else
echo "No Path Info";
?>
When I run it like so www.website.com/index.php
it works. ie) www.website.com/index.php/hello
will echo /hello
However, if I go to www.website.com/hello
, I get a URL not found error when what I want is that /hello
is echoed.
How do I make it so that index.php
doesn't have to be present for PATH_INFO to work?!