manalnor Posted February 23, 2011 Share Posted February 23, 2011 Hello dear friends, Let say we have $to = "gigi"; then we have link like this mysite.com/file.php?id=$1 We can change it to new form by add rule at .htaccess codes RewriteRule -(.*)\.htm file.php?id=$1 So that the link be like this mysite.com/$to-$id.htm it will works , Now what if i want to make the link like this mysite.com/$id/$to.htm what will be the .htaccess code in this way ??? thanks Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted February 23, 2011 Share Posted February 23, 2011 http://www.phpfreaks.com/forums/php-coding-help/link-id-changes-!/msg1531975/#msg1531975 Quote Link to comment Share on other sites More sharing options...
manalnor Posted February 23, 2011 Author Share Posted February 23, 2011 i've fixed the _ to - and html to htm as you've said. but do you have any idea how would be the htaccess rule if i'm willing to make the link $id/$to.htm Quote Link to comment Share on other sites More sharing options...
manalnor Posted February 25, 2011 Author Share Posted February 25, 2011 any idea how to write the .htaccess rule in this cas Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.