[WEB4LIB] HTTP 301 Redirect Question

Erik Hetzner egh at ocf.berkeley.edu
Thu Apr 7 13:13:34 EDT 2005


Dear Robert,

RedirectMatch 301 ^/directoryname/.*$ http://www.scpl.org/deadpage.html

Works on Apache 1.3. There may be a better solution.

Best,
Erik Hetzner

At Thu, 7 Apr 2005 06:38:05 -0700 (PDT),
"Robert Sullivan" <rsullivan at sals.edu> wrote:
> 
> I have previously used pages with meta refresh tags when I needed to
> redirect visitors, but impending major changes to our site caused me to
> look at doing it the "real" way.  Our site is hosted on a Unix server
> running Apache.
> 
> 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
> 
> I spent 45 minutes on the phone with the ISP's owner while he tried
> various combinations of regular expressions in my .htaccess file.  There
> is probably something simple that we're both missing.  Any advice would
> be appreciated.
> 
> 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