summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-10-12 21:01:34 +0000
committerBrion Vibber <brion@pobox.com>2009-10-12 21:01:34 +0000
commit18df82ba2302d5b72bc42f4d3296d6fff7d16341 (patch)
treece2f955ff860b8d7355d64391d68a0f955067ec9 /index.php
parent131292472c4bca7e99ee821ae62853f36f4c7bef (diff)
parent2b6dfbdf2b9df0992018f8df1f54b4cf16185599 (diff)
Merge branch '0.8.x' of git://gitorious.org/~brion/statusnet/brion-fixes into 0.8.x
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/index.php b/index.php
index 7669778f6..362ab3cd3 100644
--- a/index.php
+++ b/index.php
@@ -32,7 +32,13 @@ function getPath($req)
&& array_key_exists('p', $req)) {
return $req['p'];
} else if (array_key_exists('PATH_INFO', $_SERVER)) {
- return $_SERVER['PATH_INFO'];
+ $path = $_SERVER['PATH_INFO'];
+ $script = $_SERVER['SCRIPT_NAME'];
+ if (substr($path, 0, mb_strlen($script)) == $script) {
+ return substr($path, mb_strlen($script));
+ } else {
+ return $path;
+ }
} else {
return null;
}