wutils (wrm, wrmdir, wmv)

Tools to help organize files without breaking web links. wrm is a wrapper for rm, but prompts you for a redirection so that users don't get '404 Not Found'. You have a choice of Gone, See Other, Moved Temporarily or Moved Permanently redirection. Similarly wrmdir wraps rmdir. wmv is a wrapper for mv that automatically sets up Moved Permanently redirection.

Each of these tools create (or append to) a .htaccess file in the current directory, and require an Apache server with mod_rewrite, and a URL structure that follows the directory structure.

In fact, they are a single executable that looks at its own name, but that shouldn't matter (I think the real mv and rm were a single hard-linked executable in System V).

Unfortunately wrm, wrmdir, and wmv can't yet cope with absolute paths or paths containing '..'. They only know how to write a .htaccess file for the current directory.

Current version

The current version is 0.1.2. This adds wrmdir.

Download

Installing

% ./install --prefix=/usr/local
or wherever.

Author and copying

By Ed Avis <ed@membled.com>. These programs are in the public domain, which means there are no copyright restrictions. Giving credit is polite but not required.

See also


Ed Avis
Last modified: Thu Aug 7 12:48:50 BST 2008