> I'd like to use wget to create a static version of my 
> dynamic site... 
>
> wget -m works great, except that it creates files like
> this:
>
> bestsavers.jsp?id=4&cat=7
>
> Can I tell wget to convert those links.. replacing all
> ? and & with _ ?

You'll have to modify the source code to wget, I think. Fortunately, this is
Free Software, so you can! Load up src/url.c into an editor and look for the
following code snippet:

#ifdef WINDOWS
  {
    char *p = file;
    for (p = file; *p; p++)
      if (*p == '%')
        *p = '@';
  }
#endif /* WINDOWS */

First, unless you're actually running on Windows, get rid of the lines that
start with "#ifdef" and "#endif".

Next, change the lines

      if (*p == '%')
        *p = '@';

to

      if (*p == '?' || *p == '&')
        *p = '_';

This is untested, but I think it should work. I hope it does!

Hope this helps,
Ed

Reply via email to