I came across many ways to create canonical or friendly urls in php if a project is to be built from core php without using frameworks like laravel or similar.
One approach uses .htaccess. I have an application where I need to make friendly directory structure visible to users. Something like this...
mysite.com/science/light/level1/easy/questions
What is the best and secure way to achieve this that can be reliable for a website with good amount of content.