Hmm...okay...putting it into PHP is not a good idea. I'm having no luck. I really want to do this through htaccess. Can someone show me what I can add to the code above to prepend the www? Thanks.
It needs to go in your web server configuration because the name needs to be resolved before it ever gets to a directory (and a .htaccess file). ServerAlias is the way to do that.
OK, so I admit it. I was totally intrigued and stumped by this problem. So I ran across a forum dedicated to mod_rewrite and posed this same problem there. This was the response (customized to evilmonkey's website). Don't know if it will work, but I figured it was worth the shot. Not to mention I really want to know how to do it. Not so I can use it, just so I know if it can, and how it might be, done. Anyhow, this may be something to try...
arborint wrote:It needs to go in your web server configuration because the name needs to be resolved before it ever gets to a directory (and a .htaccess file). ServerAlias is the way to do that.