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 Link to comment https://forums.phpfreaks.com/topic/228646-links-structure/ 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 Link to comment https://forums.phpfreaks.com/topic/228646-links-structure/#findComment-1178901 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 Link to comment https://forums.phpfreaks.com/topic/228646-links-structure/#findComment-1178902 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 Link to comment https://forums.phpfreaks.com/topic/228646-links-structure/#findComment-1179543 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.