Hello, I'm working on moving a Web server to a new location, and to test it, I'd like to use a simple filter to replace all references to the old server name with the IP address of the new server. This is just for testing, so it's OK that it's not a perfect solution.
Basically, I'm doing: s/(?:www\.)?sitename\.(?:com|net|org)/1.2.3.4/ig; I've got it working right now, but I'd like it to know the Content-Type that Apache would use for a document, so I can decide whether to filter it and so I can send a correct Content-Type header. I can try to guess the content-type from the filename (which is what I'm doing now), but I'd prefer not to re-implement Apache's system for deciding content types, and I'd also like it to Do The Right Thing for CGI/mod_perl scripts, where you can't tell by the filename what content-type they're going to output. Is there a way to do that? Thanks! ---ScottG.