[Web4lib] 301 Redirects question
garyp at itd.umd.edu
garyp at itd.umd.edu
Wed Oct 12 17:08:56 EDT 2005
Another option (if you are using apache) is mod_rewrite which uses regular
expressions to rewrite URL's. It may seem a little daunting at first but
if you have to do some heavy duty url rewriting it is a very valuable
tool. I've included the 2.0 link below, but if you are running 1.3, just
substitute 1.3 in the url.
http://httpd.apache.org/docs/2.0/mod_rewrite.html
Here's the header from the doc page:
------------------------------------------------------------
`The great thing about mod_rewrite is it gives you all the configurability
and flexibility of Sendmail. The downside to mod_rewrite is that it gives
you all the configurability and flexibility of Sendmail.''
-- Brian Behlendorf
Apache Group
`` Despite the tons of examples and docs, mod_rewrite is voodoo. Damned
cool voodoo, but still voodoo. ''
-- Brian Moore
bem at news.cmc.net
Welcome to mod_rewrite, the Swiss Army Knife of URL manipulation!
This module uses a rule-based rewriting engine (based on a
regular-expression parser) to rewrite requested URLs on the fly. It
supports an unlimited number of rules and an unlimited number of attached
rule conditions for each rule to provide a really flexible and powerful
URL manipulation mechanism. The URL manipulations can depend on various
tests, for instance server variables, environment variables, HTTP headers,
time stamps and even external database lookups in various formats can be
used to achieve a really granular URL matching.
-----------------------------------------------------------------
(end snippet)
On Wed, 12 Oct 2005, Bill Erickson wrote:
>If you can define the pages you want to redirect in the form of regular
>expressions, the Apache RedirectMatch directive might be the thing you need.
>
>http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirectmatch
>
>On 10/12/05, Vishwam Annam <vishwam.annam at wright.edu> wrote:
>>
>> Dear Web4 Lib members,
>>
>> We use 301 redirects to redirect an old webpage to the new one. We had
>> static html pages for our databases, and recently made all of them
>> database driven. Due to this, I ended up having around 1,000 or so..
>> changed URLs, which needed redirects. If I add all these 1,000 to the
>> httd.config file, then the file size gets huge and it can significatly
>> impacts the server load.
>>
>> I was wondering, has any one across the similar problem, if so how you
>> hndled this? I am sure, we could create "page moved" pages for these
>> links, but that can be tediuous work.
>>
>> Thanks for any assitance,
>>
>> Vishwam
>>
>> Vishwam Annam
>> Web Developer
>> 120 Paul Laurence Dunbar Library
>> 3640 Colonel Glenn Hwy.
>> Dayton, Oh 45435
>> Office: 937-775-3262
>> FAX 937-775-2356
>> _______________________________________________
>> Web4lib mailing list
>> Web4lib at webjunction.org
>> http://lists.webjunction.org/web4lib/
>>
>
>
>
>--
>Bill Erickson
>PINES Systems Developer
>Georgia Public Library Service
>billserickson at gmail.com
>http://open-ils.org
>_______________________________________________
>Web4lib mailing list
>Web4lib at webjunction.org
>http://lists.webjunction.org/web4lib/
>
****************************************************************
Gary B. Phillips email: garyp at itd.umd.edu
Web Systems Manager phone: 301 405 9025
ITD mobile phone: 301 318 6902
****************************************************************
More information about the Web4lib
mailing list