Jump to content

How to make such link


manalnor

Recommended Posts

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

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  :shrug:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.