This is an ongoing problem for me for which I've been posting in both Apache and PHP forums.
If the PHP is configured to run in Apache module, AcceptPathInfo Off directive resolves the problem.
But if the server has PHP configured to run as CGI or CGI/FastCGI module, this is a headache if I want to use PHP in any manner as I can't stop that trailing slash return content which creates endless number of links to endless number of duplicated pages.
Please, correct me if I'm wrong, but according to this, the directive should work, right:
Yet, adding AcceptPathInfo Off to .htaccess if the server is configured as CGI or CGI/FastCGI simply does not change anything.
I tried renaming HTML files to PHP so I don't need to use any AddHandler or AddType, but since PHP is being called, trailing slash returns content. Aaahhh...
For PHP folks that install and run PHP on their servers, what's up with this trailing slash when PHP is configured to run as CGI?
I learned about the background of it as PHP uses added stuff after the slash, fine. But how do I stop it?
I see I wrote "How to stop trailing slash produce 404?" in the sub-line of the subject. It should state "How to make trailing slash produce 404?