i work with a website. in which i want to urlrewrite for
example my url is www.test.com/express.php?project_id=4&group_id=3
Now how can i convert it into www.test.com/project_name.html
i get project name from database using project id....

Try the following in the express.php file:

<?php
require("DBConnect.php");  //The file in which there is a variable that handles the connection to the database
$project_id = $_GET['project_id'];
$GetProjectName = mysql_query("select project_name from tableName where project_id='$project_id'",$connection);  //Where (tableName) is the name of the table required for the operation
$project_id_Arr = mysql_fetch_array($GetProjectName);
echo '<script language="JavaScript">
    window.location.href = "www.test.com/'.$project_id_Arr['project_name'].'.html";
</script>';
?>

Or you can use the META like the following code instead of the JavaScript code:

echo '<META HTTP-EQUIV= "REFRESH" CONTENT= "2; url=www.test.com/'.$project_id_Arr['project_name'].'.html">';

Wish it's done what you were searching for.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.