ISAPI and mod_rewrite redirect

So I’m working on try to get a redirect going on an IIS server with ISAPI on it. The syntax is pretty much the same as mod_rewrite though.

This is a totally dead simple question I can’t seem to figure out. :frowning:

I’m using:



RewriteRule (.+) http://newserver.com$1 [R=301,L]

which is making oldserver.com redirect to newserver.com great, except for actual pages on the site. oldserver.com/hi-opal will try to redirect to newserver.com/hi-opal which doesn’t exist. How can I make every request to oldserver.com just go to newserver.com?

Thanks y’all!

Just removing the “$1” from the rewrite rule should do the trick.

(ETA: I should probably mention that I don’t have much experience with IIS; but if it’s working like Apache’s mod_rewrite, anyway, the $1 is being replaced with the original path requested from oldserver.com – i.e., the string matched by the (.+) expression.)

There is no emoticon to express the pure joy I feel because your solution worked.

Glad I could help. :slight_smile: