<?php // take the request $request = strtolower($_SERVER[’REQUEST_URI’]); // see if it contains a tag if (strpos($request,â€tag/â€)) { // delete all before tag/ $a = substr($request, strpos($request,â€tag/â€)); // delete tag/ $a = substr($a,4); } // we have the tag. $keyword = urldecode($a); } { header("Location: http://www.mysite.com/index.php?tag=$keyword"); } ?> PHP:
What error you are getting? If this is complete code than you have extra curly braces $keyword = urldecode($a); }// no opening brace for it {// not required here header("Location: http://www.mysite.com/index.php?tag=$keyword"); }// not required here PHP: