manalnor Posted July 5, 2010 Share Posted July 5, 2010 Hello if we have $x = sad and $y = die and $z = me and $w = you and link as following index.php?go=at&ID=$x&Cat=$y and want to rewrite it RewriteRule _(.*)_x_(.*)\.html index.php?go=at&ID=$1&Cat=$2 that should be _sad_x_die.html what if i want to add 2 varibale to be $z_$w_sad_x_die.html how then i write the RewriteRule !!!! that one won't work RewriteRule _(.*)_x_(.*)\.html however it works if i add to the link only $z or $w only one so why can't add 2 thanks Link to comment https://forums.phpfreaks.com/topic/206820-how-to-make-such-link/ Share on other sites More sharing options...
premiso Posted July 6, 2010 Share Posted July 6, 2010 Add another re-write rule to catch to extra variables. You can have multiple re-write rules just add [L] at the end of them (that means "leave" the script if that rewrite rule processes. Link to comment https://forums.phpfreaks.com/topic/206820-how-to-make-such-link/#findComment-1081647 Share on other sites More sharing options...
manalnor Posted July 6, 2010 Author Share Posted July 6, 2010 Add another re-write rule to catch to extra variables. You can have multiple re-write rules just add [L] at the end of them (that means "leave" the script if that rewrite rule processes. thank you so much, could you please upon the above exmple write it to me cause i don't know how to add another re-write rule for the same link Link to comment https://forums.phpfreaks.com/topic/206820-how-to-make-such-link/#findComment-1081658 Share on other sites More sharing options...
premiso Posted July 6, 2010 Share Posted July 6, 2010 ... RewriteRule (.*)_(.*)_(.*)_x_(.*)\.html index.php?go=at&ID=$1&Cat=$2&other=$3&another=$4 [L] Link to comment https://forums.phpfreaks.com/topic/206820-how-to-make-such-link/#findComment-1081660 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.