I have a WordPress blog hosted on IIS and I've been trying to get ISAPI_Rewrite to work so that I can prepend www to the URL. It isn't working after 3 hours, so I just want to use PHP redirect to get it working. I've done it before with ASP (which I've included) but I don't know PHP well enough to translate this code. Can you do it?
If InStr(Request.ServerVariables("SERVER_NAME"),"www") = 0 Then
Response.Status="301 Moved Permanently"