Hi all, not sure where this belongs, but I just thought I'd share a hack with you guys, mainly to make sure I'm not doing something bad.
I prefer my php webapps to work out as much of their environment as possible, to save on configuration steps.
As such, I edited config.php with the following:
// The root web url for your limesurvey installation (without a trailing slash).
//$rooturl = "http://{$_SERVER['HTTP_HOST']}/path/to/limesurvey";
// SM 20Jan11: Dynamic rooturl, for /admin pages, set one level up
$rooturl = "http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
if('admin' == basename($rooturl)) { $rooturl = dirname($rooturl); }
Anyway, feedback welcome. I did this because my dev/staging and live environments have different paths/urls, and I got tired of maintaining different settings per environment!
// SM