On Oct 11, 5:08 pm, "bax...@gretschpages.com" <mail.bax...@gmail.com>
wrote:
> I'm sure this is simple and I'm just not constructing the URL
> properly. Basically, it used to be a drupal site, with the cruddy old
> Drupal every url is a querystring setup. What I want is pretty
> simple... all of those old URLs resolve to the home page and send a
> 301 to the spider.
>
> I tried:
>         (r'^?q=taxonomy/term/[0-9]+$', redirect_to, {'url': '/', 'permanent':
> True}),
>
> And failed most spectacularly. Do I need to be escaping something, or
> what am I missing?

What you're missing is that elements after the ? are *not* part of the
URL - they are part of the querystring. These are passed through into
the view and can be accessed via request.GET.

In any case, for a blanket redirect like that, you would be better off
doing it directly via Apache (or whatever your webserver software is),
rather than invoking Django each time.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to