I'm looking to achieve similar functionality on my site as facebook does for its pages section. Basically I want users to be able to navigate to:
www.mysite.com/school123
Then behind the scenes I would be able to locate 'school123' using URL with PHP, then I can find the correct path in the database and redirect to the correct path (example: www.mysite.com/pages/schools/school123/index.php ). Problem is as the page doesn't exist I get a 404 error.
My question is should I look at modifying the 404 page to do the DB lookup & redirect my page or is there a better way of doing this?
Thank you in advance