Apache2: mod_rewrite vs. mod_proxy

I can’t quite figure this out. I’m trying to write a simple rule to force randys.org to redirect to www.randys.org but it’s not realy working. Of course, I haven’t tried it on a vhost that isn’t proxying request to mongrel. Here’s the rule:

RewriteEngine On
RewriteCond %{HTTP_HOST}    !^www.randys.org$ [NC]
RewriteCond %{HTTP_HOST}    !^$
RewriteRule ^/(.*)          http://www.randys.org/$1 [R=301,L]

Anyone?

2 thoughts on “Apache2: mod_rewrite vs. mod_proxy

  1. Hmmm, for some reason, this isn’t working. I’ve added this to the main apache2 config as well as the config for the site and the .htaccess file. I seems like it just ignore it. I’m wondering if it has something to do with mod_proxy?

    Thanks… some random template. ;)