# here's number 2--and where things start to fall apart. this rule works on my# development machine (Windows/Apache 2.2) but not on the production machine# (Linux/Apache 1.3). by "doesn't work", i mean it triggers a 500 errorRewriteRule ^(.+)/$ $1 [R=301,L]

# so, on the production machine, i use this rule insteadRewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

# that takes care of the first two items; now for 3

# here i have to restate the preconditions from above--is there another way?RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-d

# for URIs of the form http://www.mywebstore.com/products/123, "123" maps to the# query parameter "item-number". this rule works locally, but hoses the# production server (500 error). same with the next ruleRewriteRule ^products/([0-9]+)$ index.php?controller=products&item-number=$1 [QSA,L]

# Unless you have a /products or /content directory you don't# need to make sure it's not an existing file/directory. Even# then you only need to do that if you will be accessing it# with a browser.RewriteRule ^products/([0-9]+)$ /index.php?controller=products&item-number=$1 [QSA,L]RewriteRule ^content/([a-z]+)$ /index.php?controller=content&page=$1 [QSA,L]

(I'm the original poster. My username is metaphile, not prettyjenny. I have no idea what happened there.)

Thank you rich. Your suggestions put me on the right path. It turns out I had more problems than I realized. Here's an excerpt from my revised .htaccess file, to give you some idea of my trials over the last couple of days:

# when i write regular expressions, i make a point to escape special characters,# even when it's not strictly necessary to do so. the following regex includes a# literal hyphen as part of a character set. the hyphen is the first character,# and so doesn't _need_ to be escaped

# the domain name of the production website is not set up (yet), so I'm# accessing the site through a temporary alias that looks something like this:# d999999.u32.mywebhost.com. redirecting to /$1 doesn't work, because somewhere# along the line, /$1 becomes notsetupdomain.com/$1. to avoid this, i have to# manually construct the target URI using %{HTTP_HOST}RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

Everything is working now and I'm an ounce less intimidated by mod_rewrite. Thanks again, rich!