I am working on php
actually I need SEO urls for search queries script I have written in folder called as newtheme
(folder name). When I try to do SEO urls not working not found showing when perform search. Please check my code and correct me where i did wrong.
in my htaccess
RewriteCond %{ENV:REDIRECT_STATUS} !200
RewriteCond %{QUERY_STRING} ^searchword=([^&]+)$
RewriteRule ^results.php$ /newtheme/%1/? [L,R=301]
In my results.php
if($_GET['searchword'];
{
$q= mysql_real_escape_string($_GET['searchword']);
$sql=mysql_query("select * from table where keyword='$q'");
$row=mysql_fetch_array($sql);
echo $row['title'];
}
?>
htaccess file placed at my folder inside as newtheme. script folder localhost/newtheme/.htaccess