I have a url like: http://www.mydomain.com/nature_scene-3.html i need it to redirect to http://www.mydomain.com/show.php?id=$1 i do not care about the nature_scene, just the 3 is the key. i have a rewriterule like: RewriteRule [*]_([0-9]+).html show.php?id=$1 but it not works. can anyone help?
sorry, this is just off the top of my head, but this should work: RewriteRule ^(.*)([0-9]+).html show.php?id=$2
if you want to redirect to a page,then you use header("locationop.php"); <?php $i=1; header("location:show.php?id=".$i); ?>