Nginx Dynamic Rewriting

Hello there,

is there a way to do dynamic rewriting something like this:

http://localhost/param1/param2/param3/key4/value4/key5/value5/key6/value6
and so on.

key value pairs can differ in wording and count.

i want to rewrite this to something like
index.php?p1=$1&p2=$2&p3=$3&(loop)$4=$5 …

Thx.

On Wed, Jun 15, 2011 at 4:14 PM, Alexander Over
[email protected] wrote:

Hello there,

is there a way to do dynamic rewriting something like this:

http://localhost/param1/param2/param3/key4/value4/key5/value5/key6/value6 and so
on.

key value pairs can differ in wording and count.

i want to rewrite this to something like index.php?p1=$1&p2=$2&p3=$3&(loop)$4=$5

yes, it’s called “parse in php”

make it pass p=param1/param2/param3/…
the split by ‘/’ and assign each of them to correct variable

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs