Link ID Changes !

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
egturnkey
Forum Commoner
Posts: 34
Joined: Sun Jul 26, 2009 7:35 pm

Link ID Changes !

Post by egturnkey »

Hello dear friends,

Let say we have

Code: Select all

$to = "gigi";
then we have link like this

Code: Select all

mysite.com/file.php?id=$1
with .htaccess code

Code: Select all

RewriteRule -(.*)\.html file.php?id=$1
we can make the link like this

Code: Select all

mysite.com/$to-$id.htm
it will works , Now what if i want to make the link like this

Code: Select all

mysite.com/$id/$to.html
what will be the .htaccess code in this way ???
thanks for help
Post Reply