Greetings,
just migrating my sites over from Apache to nginx and the speed difference is actually very noticeable even no a low volume server!
My problem is that in Apache I used a PHP trick to capture variables and values from an URI which I then fed to the database.
The trick was
[hr]
[code]
//This only works with apache module.
$HTTP_TEMP_PATH_VARS = explode("/",$PATH_INFO);
array_shift($HTTP_TEMP_PATH_VARS);
reset($HTTP_TEMP_PATH_VARS);
$HTTP_PATH_VARS = array();
while( list($index,$key) = each($HTTP_TEMP_PATH_VARS) ) {
list($index,$val) = each($HTTP_TEMP_PATH_VARS);
$HTTP_PATH_VARS[$key] = $val;
$$key = $val;
}
[/code]
[hr]
My attempt at this is to make this rewrite:
[code]
if ($uri ~ "^(dagbok.php)(/.+)")
{
rewrite "/dagbok.php/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)$" /dagbok.php?ar=$2&man=$4&dag=$6 last;
}
[/code]
The URI looks like this:
http:///my.website.com/file.php/var1/value1/var2/value2/var3/value3
and I need it interpreted into
http://my.website.com/file.php?var1=value1&var2=value2&var3=value3
I've trawled through the limited examples I've found and tried several versions but so far not been able to find a way for this to work.