PHP is *NOT* the problem. Check the Apache docs
here[
^] for URL rewriting in .htaccess. There are many examples in the detailed documentation that is linked there. Check things like "RewriteEngine On", and be careful about what your directory has inherited.
Peter