Last modified: 2010-05-15 15:59:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 11320 - generateSitemaps creates URLs with two slashes after domain
generateSitemaps creates URLs with two slashes after domain
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-09-13 05:02 UTC by Alexander
Modified: 2010-05-15 15:59 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

patch to Title::getFullURL() to prevent building URL with two slashes in a row (122 bytes, patch)
2007-09-13 05:02 UTC, Alexander

Description Alexander 2007-09-13 05:02:07 UTC
Created attachment 4105 [details]
patch to Title::getFullURL() to prevent building URL with two slashes in a row

The maintenance/generateSitemaps.php script can build URLs with two slashes after the domain.

If using really short URLs (i.e. http://domain.tld/Article), the double slash means a browser is brought to an article with a title like "/Article", effectively preventing search engines from properly indexing content.

The double slash doesn't seem to cause a problem with normal URLs (i.e. http://domain.tld//index.php?title=Article).

Have not tested other short URLs (i.e. http://domain.tld//wiki/Article or http://domain.tld//index.php/Article).
Comment 1 Brion Vibber 2007-09-13 15:38:21 UTC
It looks like you have a bogus $wgServer setting.

$wgServer needs to be set to the URL protocol, host, and port (if necessary), with *no* path component, as paths are appended to it.

eg '' or ''.
Comment 2 Alexander 2007-09-14 03:05:14 UTC
I feel dumb; it's because I've been calling the script with --server=http://domain/ (note slash at the end)...

So how about a note in the help string about leaving off the slash, or trimming it off of $options['server'] before $wgServer is set to it?

Note You need to log in before you can comment on or make changes to this bug.