I have a group of files something like this:
example.com/test-1234.html
example.com/test-5678.html
example.com/test-9101.html
example.com/test-1213.html
example.com/test-1415.html
Some exist, some don't... I'm trying to set up a redirect so the ones that don't exist are sent to my search page and the ones that do exist aren't modified at all. I've got this semi-working, except it sends the user to my live directory(www.example.com) instead of my development directory(dev.example.com):
#RewriteCond %{REQUEST_FILENAME} !-f
#RedirectMatch /test-(.*).html search.example.com/search/test-$1 [R=301]
So my question is, is there a better way to do this? If not, how do I make it stay on the development directory and not send me to the live one?