I have a 301 Redirect using the following code: ---------------------------- [ISAPI_Rewrite] RewriteCond Host: (www\.)?massageclients\.com RewriteRule (.*) http\://www.massagelaunch\.com$1 [I,RP] ----------------------------- This works pefectly from some PCs (megaproxy.com) but from other places it goes to this bad url "http://www.massagelaunch.comwww./" any idea what's adding the "www./" at the end??
That stupid ISAPI_Rewrite tool you are using messes up Rule backreferences with Cond backreferences. So backreference $1 appends the text "www." matched by group (www\.) in your condition regex, instead of the url matched by group (.*) in your rule regex. You better use IIS Mod-Rewrite ( http://www.micronovae.com/ModRewrite/ModRewrite.html ) which is a very serious and stabile rewrite solution for IIS. It's absolutely compatible with apache mod_rewrite and it won't ever cause you such problems. Your script, regardless of using it with apache mod_rewrite or IIS Mod-Rewrite, should be written as below: RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\.)?massageclients\.com$ RewriteRule (.*) http://www.massagelaunch.com$1 [NC,R=301]