Yes, of course I have searched for this question online as well as here on Sitepoint. And no there is not such a question and answer.
Now provide some more info about this challenging question:
we have tried grabbing and parsing the URL using Php code:
to parse the URL for this purpose. But the problem with this is that Apache is sending straight to "Page Not Found" and not allowing the code in index.php parse the URL.
And we do not want to turn off Apache: RewriteEngine on
because in case of anything else but index.php we want them send to "Page Not Found" if the entered URL does not exist.
So how can we do this?