[WEB4LIB] HTTP 301 Redirect Question

Nick Dobbing ndobbing at uoguelph.ca
Thu Apr 7 10:09:09 EDT 2005


Bob, instead of using a redirect directive, you might try errordocument 
instead.

Using .htaccess in a folder (whether the root, or subordinate folders), 
you can set an errordocument directive to catch errors resulting from 
missing pages in the folder (without regular expressions), and redirect 
them to an error page.

See

http://httpd.apache.org/docs/mod/core.html#errordocument

Regards,

Nick Dobbing
University of Guelph

Robert Sullivan 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