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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13320, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11320 - generateSitemaps creates URLs with two slashes after domain
generateSitemaps creates URLs with two slashes after domain
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.11.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  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: ---


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

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 'http://example.com' or 'https://custom-secure.example.com:4443'.
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.


Navigation
Links