Jump to content

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:

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.