Page MenuHomePhabricator

When installing under IIS, $wgArticlePath = "$wgScript?title=$1" should be set
Closed, ResolvedPublic

Description

Author: robchur

Description:
Upon installing MediaWiki under IIS, the $wgArticlePath option in
LocalSettings.php is often set incorrectly to the "pretty URLs". Because of the
way PHP works with IIS, this is wrong, and causes a 404 not found error.

Proposed solution is to force this option to use the ugly URLs when using IIS.
This can be done during install, or manually during execution.

Patch will likely follow.


Version: 1.6.x
Severity: enhancement
Platform: PC

Details

Reference
bz4258

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:59 PM
bzimport set Reference to bz4258.

robchur wrote:

Patch against CVS HEAD

OK, the patch improves the detection for php_sapi_name(), and adds "isapi" to
the list of cases where ugly URLs will be used.

It also made no sense to default to pretty URLs when they might not work, so I
altered the default to ugly URLs in unknown cases.

Attached:

Applied to HEAD, without the redundant strtolower() as discussed on IRC.

zigger wrote:

*** Bug 1832 has been marked as a duplicate of this bug. ***