mod_rewrite and php. 500 points.
Posted on 2007-03-27
this may be a stupid question, so apologies in advance.
i've never looked at mod_rewrite before, so i'm a little confused. if i get my apache server to rewrite this page:
how does products.php know which item to show? the $_GET or $_REQUEST arrays either no longer exist (in the case of $_GET) or no longer contain the 'id' key. i have a horrible feeling that i'll then have to do something like exploding $_SERVER["PHP_SELF"] and pulling apart the url until i find the number, but i'm hoping it isn't as complicated as this, and i'm doing something wrong. afterall, if you were rewritting:
ripping apart the url could get really irritating.
any advice would be great.