Page MenuHomePhabricator

Make www.$1.wiki(media|pedia...).org redirect to $1.wiki(media|pedia...).org
Closed, ResolvedPublic

Description

I have a "http://commons.wikimedia.org" link in my sig. Two complaints so far
about getting an error on visiting the link, which turned out to be people going
to www.commons....


Version: unspecified
Severity: minor

Details

Reference
bz1698

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:14 PM
bzimport added projects: DNS, Shell.
bzimport set Reference to bz1698.

avarab wrote:

Making it a general bug.

Really strange noobs. You give them a link and instead of clicking on
it to directly display the text they rewrite it adding www.

Seriously, I am against adding a www entry in front. People should
just learn that all sites do not begin with www all the time.

walter wrote:

It could also redirect to www.wikimedia.org

@Ashar Voultoiz;
People should also learn that not al websites and on ".com". I am in favor to send all
www.wikipedia.com and *.wikipedia.org traffic to a page that says; we are an .org and proud of
it. And redirect afther 10 seconds to www.wikipedia.org.

lcarsdata wrote:

I think that this would be useful, I just typed 'www.' and then realized that I
didn't actually want that site and wanted meta so continued it and reached the
'Problem loading page' display. It would increase productivity if this were done.

I know this is an ancient low-pri bug but I'd still love to see it happen.

I noticed this bug recently, and want to add that seems to be a problem with all the projects except Wikipedia. http://www.en.wikisource.org/ , http://www.en.wiktionary.org/ and others at least offer a somewhat informative error page but they should redirect to their project like Wikipedia does (if it is for some reason too difficult to do this by fixing DNS, it could be done in PHP or Javascript of the error page itself). But http://www.commons.wikimedia.org/ and http://www.meta.wikimedia.org/ don't offer even that. Note that http://www.google.com/search?q=%22www.commons.wikimedia.org%22 gives a 100,000 results.

jeluf wrote:

Done. I didn't add *.wikimedia.org due to the high number of 'other' special hosts in that domain.

Postrewrite:

<VirtualHost *>
ServerName redirector-ws.wikipedia.org
ServerAlias *.wikisource.org
ServerAlias *.wiktionary.org
ServerAlias *.wikiversity.org
ServerAlias www.commons.wikimedia.org
ServerAlias www.meta.wikimedia.org

RewriteEngine On

RewriteMap lowercase int:tolower
RewriteCond %{HTTP_HOST} ^www\.([^\.]+)\.([^\.]+)\.org
RewriteRule ^(.+) ${lowercase:%{HTTP_HOST}}$1 [C]
RewriteRule ^www\.([^\.]+)\.([^\.]+)\.org(.*)$ http://$1.$2.org$3 [R=301,L]

</VirtualHost>

jeluf wrote:

I was too optimistic. Apparently not working. Investigating.

jeluf wrote:

OK, this time it worked.

The postrewrite section of our http config apparently is not being used any more, the catch-all rewrites are already included in the general per-project <VirtualHost> containers.

epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:22 AM