I've written a simple PHP nusoap web service for an application and wish to change the name of one of the actions so that it makes more sense. However there is a CD-ROM based application in the wild using this web service and this action and so I need to redirect or alias any incoming requests to the new action... any idea how I might go about doing this?
A:
I'm assuming by action you mean a function, why not something as simple as.
function oldName($a, $b)
{
return newName($a, $b);
}
function newName($a, $b)
{
// do something
return $a + $b;
}
Seems like a quick and easy solution.
evolve
2010-05-11 13:22:04
A:
If your HTTP server features URL rewriting you can use this solution to translate the old action to the new one without the need to touch the code.
In Apache, for instance, it's a matter enabling mod_rewrite and setting up the rewrite rules either in the host configuration or in an .htaccess file within your application.
nuqqsa
2010-05-11 15:11:35