Yes indeed there are ways to do this, but it depends on what server software you are using. In the case of Apache web server, then it needs to have the module mod_rewrite installed (follow the link for docs on how to configure it).
You should bear in mind though that “security by obscurity is no security at all”, and there are plenty of other ways that an attacker can determine that you are using PHP. If it is more SEO that you’re concerned with, then your second example (search URIs) is not really applicable as you can screen those from search engines anyway.
Now that you’re here and asking about mod_rewrite (whether you knew it or not), have a read of the mod_rewrite tutorial linked in my signature. It was built after answering repeated questions for years in this board and should give you all the basic (and some advanced) information you need to do just about anything with this tremendous Apache tool. It’s helped many members over many years so I’m sure it’ll help you, too.