Opened 16 years ago

Closed 14 years ago

Last modified 10 years ago

#6342 closed Uncategorized (wontfix)

Option to remove 'www.' from URLs

Reported by: corporeal <corporeal@…> Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords: www remove global_settings middleware common
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Considering there's a PREPEND_WWW and APPEND_SLASH, I thought it only proper there be a REMOVE_WWW option as well.

For reasons why someone would do this: http://no-www.org/

The attached patch does this in conformance with django coding standards.

Attachments (1)

patch_removewww.patch (2.3 KB ) - added by corporeal <corporeal@…> 16 years ago.
Patch to add REMOVE_WWW optionA?

Download all attachments as: .zip

Change History (8)

by corporeal <corporeal@…>, 16 years ago

Attachment: patch_removewww.patch added

Patch to add REMOVE_WWW optionA?

comment:1 by Simon Greenhill <dev@…>, 16 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by Malcolm Tredinnick, 16 years ago

Resolution: wontfix
Status: newclosed

No, we've rejected this in the past. We provide a way to have consistency via the existing settings variables. If somebody doesn't want that sort of consistency, they are free to use their own middleware to make whatever changes they like, but Django isn't going to provide multiple ways to do the essentially the same thing (normalisation). The arguments at the referenced website aren't particularly strong and there's no technical or usability problem with having www in a URL.

comment:3 by corporeal <corporeal@…>, 16 years ago

Resolution: wontfix
Status: closedreopened

This isn't adding another way to do normalization. This is a way to do a different KIND of normalization. If you truly don't think this belongs in Django, then perhaps we should be removing the existing PREPEND_WWW?

comment:4 by Malcolm Tredinnick, 16 years ago

Resolution: wontfix
Status: reopenedclosed

It truly doesn't make a difference if www is consistently appended or consistently removed. The point is that the URL is normalised.

Please do not reopen this ticket.

comment:5 by andrew.r.kelley@…, 14 years ago

Resolution: wontfix
Status: closedreopened

I don't know how you can say "it doesn't make a difference." Clearly, people care about whether 'www' is present or not. The fine gentleman even provided a patch. Swallow your pride and make django a better framework!

comment:6 by Łukasz Rekucki, 14 years ago

Resolution: wontfix
Status: reopenedclosed

This has been closed by a core developer as won't fix 2 times now. Please, don't reopen tickets just because you think different. The proper way to do this, is discussing the issue on django-developers mail group.

To anyone that visits this ticket in the future: you *can* write your own middleware for this that will take about 5-6 lines. You can also do this kind of stuff in most HTTP servers (which is even better, because you don't have to hit the Django stack just to do a simple redirect).

comment:7 by Patrick Robetson, 10 years ago

Easy pickings: unset
Severity: Normal
Type: Uncategorized
UI/UX: unset

...and for anybody looking for this middleware like me, here's a link to get you started:

http://dryan.me/articles/remove-www-urls-django/

Note: See TracTickets for help on using tickets.
Back to Top