mod rewrite - url masking mod_rewrite -
i surely learning php, , going until now.
i looking url rewrite, db relatively indepth , typical url like:
players.php?position=1&teamid=4&playerid=129
basically want return /defender/arsenal/thomas-vermaelen/ names associated id's in database. 1 page generates lots of different pages , wanted workout how use name in url instead of id number.
im 99% sure can done have been looking in detail @ joomla cms system, , wondered if shed light on please?
thanks in advance
richard :)
i think easiest map requested uri /defender/arsenal/thomas-vermaelen/
onto /players.php?position=defender&teamid=arsenal&playerid=thomas-vermaelen
:
rewriterule ^/([a-za-z]+)/([\w-]+)/([\w-]+)/$ /players.php?position=$1&teamid=$2&playerid=$3
then in php script can check whether parameter value numeric or alphabetic , fetch the numeric id in case of latter.
Comments
Post a Comment