aboutsummaryrefslogtreecommitdiffstats
path: root/api.php
diff options
context:
space:
mode:
authorRoan Kattouw <catrope@users.mediawiki.org>2009-04-24 19:50:50 +0000
committerRoan Kattouw <catrope@users.mediawiki.org>2009-04-24 19:50:50 +0000
commit13d180553d128193c6fbfeac1ff92c2695676316 (patch)
tree6aa223bc38e88e419f2d24e51f7f79b12bb32e96 /api.php
parentf744c13787854798e7f755d5fa784cfbfbcce77d (diff)
downloadmediawikicore-13d180553d128193c6fbfeac1ff92c2695676316.tar.gz
mediawikicore-13d180553d128193c6fbfeac1ff92c2695676316.zip
API: (bug 13049) This'll hopefully fix the 403 Forbidden error in api.php for the setups that were getting them (most notably FastCGI and IIS). Patch by Chris Wrinn
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/49833
Diffstat (limited to 'api.php')
-rw-r--r--api.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/api.php b/api.php
index eb223994d033..546969f23f72 100644
--- a/api.php
+++ b/api.php
@@ -51,10 +51,10 @@ wfProfileIn('api.php');
//
// Ensure that all access is through the canonical entry point...
//
-if( isset( $_SERVER['SCRIPT_URL'] ) ) {
- $url = $_SERVER['SCRIPT_URL'];
+if( isset( $_SERVER['SCRIPT_NAME'] ) ) {
+ $url = $_SERVER['SCRIPT_NAME'];
} else {
- $url = $_SERVER['PHP_SELF'];
+ $url = $_SERVER['URL'];
}
if( strcmp( "$wgScriptPath/api$wgScriptExtension", $url ) ) {
wfHttpError( 403, 'Forbidden',