For example, I have a school table
id
name
description
so the values are like
1
Lincoln High
...
2
Washingtion Junior High
...
3
Regan Institutue
...
The web page to display the schools will be like this is school.php
http://www.mysite.com/school.php?id=1
For Lincoln High
http://www.mysite.com/school.php?id=2
For Washington Junior High
etc.
Now I also want
http://www.mysite.com/lincolnhigh to be able to redirect to
http://www.mysite.com/school.php?id=1
For Lincoln High
http://www.mysite.com/washingtonjuniorhigh to be able to redirect to
http://www.mysite.com/school.php?id=2
For Washington Junior High
etc.
How can I set these
http://www.mysite.com/lincolnhigh
http://www.mysite.com/washingtonjuniorhigh
Through php and mysql?
My solution is
1) get the school name
2) use the symlink function to create the symlinks
http://www.mysite.com/lincolnhigh
http://www.mysite.com/washingtonjuniorhigh
which will link to teh right targets
http://www.mysite.com/school.php?id=1
http://www.mysite.com/school.php?id=2
Is this the right way?
Any other options better?
Thanks!