Hi, In normal php, We use ?id=123 to send variable through URL. So, the URL would be www.example.com/page.php?id=123 and then we use $_REQUEST['id'] to receive the variable on another page. But my question is, if I use "/" instead of "?" (Ex: www.example.com/page.php/id/123), then how to receive the "id" on page.php. $_REQUEST['id'] doesn't works in this case. Thank you in advance
You do it via mod_rewrite a rule similar to this one would be used. RewriteCond ^page.php/(a-z*)/(0-9*)$ page.php?$1=$2 Code (markup):
Also you can parse $_SERVER['REQUEST_URI'] for more complex url setup without complex and long mod_rewrite