Code

Opened 8 years ago

Closed 5 years ago

#2112 closed enhancement (wontfix)

[patch] Add the reverse of PREPEND_WWW, which strips leading "www."

Reported by: pa-ching Owned by: adrian
Component: Core (Other) Version: master
Severity: trivial Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I actually wanted the exact reverse functionality given by PREPEND_WWW, so I made this tiny addition. Just a nit-picky thing, not very important.

Attachments (2)

strip_www.diff (1.3 KB) - added by pa-ching 8 years ago.
strip_www2.diff (1.3 KB) - added by pa-ching 8 years ago.
My mistake! Fixed a little error.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by pa-ching

Changed 8 years ago by pa-ching

My mistake! Fixed a little error.

comment:1 Changed 8 years ago by adrian

  • Resolution set to wontfix
  • Status changed from new to closed

This is a bit too much of a special case, so I don't think it should go in Django proper. But you can just use your own custom middleware to do it.

comment:2 Changed 5 years ago by Anogar

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I think this should be revisited. This simply rounds out the functionality of the Common middleware's ability to perform very basic redirects. More and more people are going by simply "domain.com" instead of "www.domain.com", and providing a simple method in the core middleware alongside the PREPEND_WWW method makes a lot of sense.

comment:3 Changed 5 years ago by russellm

  • Resolution set to wontfix
  • Status changed from reopened to closed

If you disagree with a decision that has been made, you should start a discussion on django-developers.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.