Using 301 instead of 302 when no lang is set in URL

Issue #6 resolved
Anonymous created an issue

If we have a site that already has a reputation, putting django-localeurl will redirect the top page to a different URL, i.e -> because the top page does not have any lang preferences on it.

From an SEO point of view in order to keep the reputation intact, it's best that we use 301 instead of 302. I have made a simple change in process_request() in the file to use HttpResponsePermanentRedirect instead like so:

$ diff

3c3 < from django.http import HttpResponseRedirect

from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect 42c42,43 < return HttpResponseRedirect(locale_path)

        #return HttpResponseRedirect(locale_path)
        return HttpResponsePermanentRedirect(locale_path)

Comments (1)

  1. Log in to comment