Someone very smart once said, instead of giving a fish to a hungry man, it is better to teach him how to fish. So I won't give you the exact solution. However, I have few tips for you.
Start with some small and easy snippet from a tutorial, that definitely works. If you can make it work on your server, then you can modify it step by step to your desired form.
If you cannot make it work, make sure, you have mod_rewrite enabled on your server. You can google easily how to do that. However, some hostings might not allow you to do this at all.
It is actually possible to have cool URL even without .htaccess and mod_rewrite. Check this answer out.
Know that there are some already prepared solutions for cool urls, most PHP frameworks has them. Actually, doing any web page without any framework is a pain in the ass. You can try e.g. Laravel (seems to be the most popular one nowadays). I am using Nette and I would never ever do webpage without it again.