Given a (slightly theoretical) physical disk layout of:\products\cameras\50d.jpg\products\cameras\20d.jpg\products\lenses\18-55.jpg\products\lenses\28-135.jpg\products.phpAt the moment, I've URLs of the form:/products.php//products.php/cameras//products.php/cameras/50dWith the products.php using the PATH_INFO to make a decision on what to display.I'm struggling to rewrite the URL to remove the .php, but still allow static resources to be retrievable though?
Removing the script extension with URL rewriting on Apache
apache;url rewriting
Turns out that this works, and still allows resources within to work.RewriteRule ^products([^\.]+)$ products.php$1