X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=www%2Findex.php;h=f8434a9ff4e7f4de392b25728ce024675e09dfc1;hb=7fffb0960436ff0cc2b1fb3642f7400e015244db;hp=340401d6183c44a1a27e3df26008d365e9fa58a1;hpb=6cf6109632946bbc8807df54229c3675b335cfba;p=readifood.git diff --git a/www/index.php b/www/index.php index 340401d..f8434a9 100644 --- a/www/index.php +++ b/www/index.php @@ -13,7 +13,8 @@ Propel::init("$propel_root/build/conf/$propel_project-conf.php"); set_include_path(join(PATH_SEPARATOR, array(join(DIRECTORY_SEPARATOR, array($propel_root, "build", "classes")), get_include_path()))); - $request = preg_replace('!^/branches/[^/]+/!', "", $_SERVER['REQUEST_URI']); + $script_url = array_key_exists('SCRIPT_URL', $_SERVER) ? $_SERVER['SCRIPT_URL'] : $_SERVER['REDIRECT_URL']; + $request = preg_replace('!^/branches/[^/]+/!', "", $script_url); $request = preg_replace('!^/+!', "", $request); $request = preg_replace('!/+$!', "", $request);