in reply to OT: redirecting http in word docs

Well ... that the link is in a word doc is immaterial. Yes, you can do this with perl (or a mod_perl handler), but the easiest way to do it is have the html pages just contain meta tags that will redirect you.

<meta http-equiv="refresh" content="2;url=http://www.your.com/construc +tion.html">

-derby

Replies are listed 'Best First'.
Re: Re: redirecting http in word docs
by Anonymous Monk on Jan 12, 2004 at 18:32 UTC
    All the https in the word documents are dead links so I need to redirect from the word doc. Please advise how I can do this in Perl?
      Could you please give more information. Do you want a perl client side solution (for example a script that you can run to change the word document to have different urls). Or do you want a server side solution so that when the link is selected a proper page is displayed? You really need to further refine what and where you want to happen.

      If it's server side. Just create the proper files with the meta tag stuff.

      <html> <body> <meta http-equiv="refresh" content="2;url=http://www.your.com/construction.html"> Redirecting to construction page! </body> </html>
      Of course you could also do some funky things like create a custom error handler and hook that into apache.

      Now if what you want is a client side solution where you actually need to modify the word doc - then I can't help you except to say you have a mixed up idea of where redirection happens. The only thing that happens in the word doc is an HTTP request is made - its up to the server to redirect. If you want to handle this on the client, you need to modify the doc and replace the bad URLs with good ones.

      -derby