PHP & MySQL .htaccess mod rewrite

I need to create a clean url what i have is
localhost/tutorials/rewrite/read-news.php?url=the-news-today
and i want it to read
localhost/tutorials/rewrite/read-news/the-news-today

The page is called read-page.php and the content is generated from the database
The news.php contains the links to each news article and my link is wrote like this
<a href=“read-news.php?url=’ . $url . '”>’ . $title1. '</a>
and it is shown like this
localhost/tutorials/rewrite/read-news.php?url=the-news-today

My code to get the article is
$url = $_GET[‘url’];
$sql = “SELECT * FROM news WHERE url = ‘$url’”;

From looking at example I thought something like this in the htaccess would sort the problem, but it does not
RewriteRule ^read-news/(.*).php read-news.php?url=$1 [L]

Can anyone help me out here please

Hi,
Maybe this works, in htaccess:

RewriteRule ^/read-news/([a-zA-Z0-9_-]+) read-news.php?url=$1 [NC,L]

When the links are created:

<a href="read-news/' . $url . '">' . $title1. '</a>

No sorry that didnt work, i dont know whats going on it should be close though

I think MarPlo is almost correct. Even though add “/” infront of ^/read-news in .htaccess refers to root path. May be try below one in .htaccess

RewriteEngine On

RewriteRule ^read-news/([a-zA-Z0-9_-]+) read-news.php?url=$1 [L]

Sorry still no go, maybe its because the way i have the pages wrote
the url taken from the database is wrote as the-news-today

This is my code on the news page

$sql = “SELECT * FROM news WHERE hide = 0”;
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
$newsid = $row[‘id’];
$title1 = $row[‘title’];
$date = $row[‘date’];
$url = $row[‘url’];
$op = “<tr>”;
$op .= ‘<td><h2><a href="read-news.php?url=’ . $url . ‘">’ . $title1. ‘</a></h2></td>’;
$op .= “<td>$date</td>”;
$op .= “</tr>”;
echo $op;
}

and on the read news page
$url = $_GET[‘url’];
$sql = “SELECT * FROM news WHERE url = ‘$url’”;
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
$title = $row[‘title’];
$article = $row[‘article’];
$date = $row[‘date’];
$op = "<h2>$title</h2>
";
$op .= "<p><em>Posted on $date</em></p>
";
$op .= "<p>$article</p>
";
$op .= "<hr />
";
$op .= "<p><a href=\“news.php\”>Back To News List</a></p>
";
echo $op;
}