php - .htaccess file rewrite id with String varient -
is possible rewrite url looks example -
mydomain.com/?id=123
lets pretend 123
id of row in db. column in row name. rewrite url based on result in db -
mydomain.com/rory
is possible?
thanks
if there's logic can map id of 123 name "rory" why don't make redirect 1 in php
$id = $_request['id']; $name = getnamebyidfromdb($id); header('location: ' . $_server["php_self"] . '/' . $name, 302); exit;
(that's example, not working code!)
Comments
Post a Comment