On Sun, Feb 22, 2009 at 8:36 PM, rihad <ri...@mail.ru> wrote: > > Hi, devs, > I'm sure I'm not the only user who doesn't like the look of trailing > slashes in URLs, or more precisely, the difference in behavior that > they imply for Django users. How about simply changing this: > > (r'^hello/$', hello), > > to this > > (r'^hello/*$', hello), > > so that any number of trailing slashes are completely optional? The > APPEND_SLASH setting would then be important in very specific cases > only.
I'm a little unclear as to what change you are proposing. The URLconf is entirely under the control of the end user. If you don't like trailing slashes, then don't use them. Django provides the APPEND_SLASH option as a way to interpret the 'missing slash' on users URLs, but if you set up your URLs to avoid the need for the trailing slash, then you have no need for the APPEND_SLASH option at all. So - what exactly are you proposing that we change in Django? Looking at your proposal as a purely end-user suggestion: using 'hello/*$' means that hello////// will match your URL pattern. 'hello/?$' would be a safer match, as it would only match a single trailing slash. However, it still wouldn't be a good idea to deploy this pattern. Some search engines (Google being a notable and prominent example) penalize websites that post identical content on multiple different URLs, as this is a common marker of SEO spam. Deploying hello/*? or hello/?$ means that multiple URLs will serve the same content. Problems with trailing slashes notwithstanding, the APPEND_SLASH approach uses a redirect, which doesn't attract the same 'Google penalty'. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---