[WEB4LIB] HTTP 301 Redirect Question
Robert Sullivan
rsullivan at sals.edu
Thu Apr 7 10:25:10 EDT 2005
> > I have most of what I need to do working, and I can redirect from a
> > discontinued directory to an error page:
> >
> > Redirect 301 /directoryname/
> > http://www.scpl.org/deadpage.html
> >
> > What does not work is the case where directoryname has
subdirectories;
> > the subdirectory (e.g., level 2) name gets appended to the end of
the
> > error page: http://www.scpl.org/deadpage.htmllevel2
> >
> Don't redirect to an error page. If there's a new location for the
> page, redirect to that. When you send a 301 status, it doesn't tell
the
> user agent the page is dead, but that the page has a new location,
which
> you're supplying. Browsers will update their bookmarks and search
> engines will update their indexes, all to point at the target of the
> Location header.
Yes, that's one of the reasons I wanted to do the redirect this way, so
the indexes would be updated.
I was concise at the expense of clarity. I have a number of pages and
directories which are moving somewhere and those are handled in the
manner you suggest. I also have a significant number of pages which are
being discontinued entirely. I haven't had to deal with that before,
and I was thinking in terms of redirecting visitors to an explanation
page.
> You say a page has been discontinued - if deadpage.html is actually an
> explanation of why it was discontinued, I'd agree that a 301 redirect
> there makes sense. If it's actually a "Page not found" message, I
think
> you want to handle things with a real 404 status, using this or
another
> page as your 404 page.
So in terms of tying up loose ends and getting the dead pages out of the
search engines, should I be doing a 301 or a 404? I would like to
handle this neatly while not frustrating my visitors.
Thanks for the suggestions; I will pass them on to my ISP.
Bob Sullivan <rsullivan at sals.edu>
Schenectady County Public Library (NY) <http://www.scpl.org/>
Schenectady Digital History Archive
<http://www.schenectadyhistory.org/>
More information about the Web4lib
mailing list