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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -