Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: redirecting http in word docs

by maa (Pilgrim)
on Jan 12, 2004 at 19:48 UTC ( [id://320743]=note: print w/replies, xml ) Need Help??


in reply to OT: redirecting http in word docs

Hi...

You didn't tell us what server it was, so here are a couple of options, one Perl(ish) and one not...

  1. If you are running under apache, see if mod_rewrite is available - if so you need to ad a ReWriteRule into your .htaccess file... this can redirect one URI to another... just enter one rule per doc/target as needed - this saves the browser actually loading the docs.
  2. The Perl solution would be to use Win32::OLE to parse all of your documents looking at their Hyperlinks collections and selectively updting their targets.
  3. I'm sure IIS has some equivalent to mod_rewrite... but then again...

You've really not given us enough info to go on... (server type? number of files?) and your replies have been surprisingly helpful :-) - if none of the above sound good then I respectfully suggest manually opening the files and editing the links...

HTH - mark

Replies are listed 'Best First'.
Re: Re: redirecting http in word docs
by Anonymous Monk on Jan 13, 2004 at 11:30 UTC
    Thanks, I thought I could do the redirect on the client side Word Doc. I have IIS server on Windows 2000. I have about 5 files.

      Hi...

      To do this on IIS you should read the IIS manual on Technet... half way down the page you'll read.

      Redirect Wildcards

      You can use redirect wildcards to match any number of characters in the original URL. Open a directory's property sheet in IIS Manager, select the Home Directory, Virtual Directory, or Directory tab, click the A redirection to a URL option, and insert the wildcard character (*) in the Redirect to text box. Begin the destination URL with an asterisk (*) and a semicolon (;), and separate pairs of wildcard characters and destination URLs with a semicolon.

      For example, to redirect all requests for /Scripts/Filename.stm to a single file called Default.stm, and to redirect all requests for /Scripts/Filename.asp to a single file called Default.asp, type the following in the Redirect To text box for the /scripts virtual directory:

      *;Filename.stm;/Default.stm;Filename.asp;/Default.asp,

      HTH - Mark

        Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://320743]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-03-28 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found