301 Redirect ignored when there's a number in the file name

Never seen anything like this before but after some testing I confirmed it was the number in the first file that was causing it:

RedirectMatch 301 /fields1.htm /field-dressing-deer

does NOT redirect properly, but if I remove the number 1 from the file name it redirects fine.

Any idea of a work-around for this? I’m redoing hundreds of pages on an antique of a site and a boatload of them have numbers in the old file names

I have never used absolute redirections, always relative one for the local server. Will give it a shot tomorrow and see what happens, really sucks thought because I am doing all the changes on localhost here and then will have to change them to the domain once we go to flip it.

Welcome back, DC!

Aw, your code disappeared (because it wasn’t in a [ code ] … [ /code ] block)!

I believe that your code isn’t working because you didn’t use an ABSOLUTE redirection. According to Apache.org:

[INDENT]RedirectMatch Directive

Description: Sends an external redirect based on a regular expression match of the current URL

Syntax: RedirectMatch [status] regex URL

Context: server config, virtual host, directory, .htaccess

Override: FileInfo

Status: Base

Module: mod_alias

This directive is equivalent to Redirect, but makes use of regular expressions, instead of simple prefix matching. The supplied regular expression is matched against the URL-path, and if it matches, the server will substitute any parenthesized matches into the given string and use it as a filename. For example, to redirect all GIF files to like-named JPEG files on another server, one might use:

RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg[/INDENT]

RedirectMatch 301 /fields1.htm [COLOR="Blue"]http://www.yadda-yadda.com[/COLOR]/field-dressing-deer 




Yeah, what you had was an absolute (internal) redirection but the example used an external redirect. If it works, don’t fix it.