[PLUG] apache rewrite

Galen Seitz galens at seitzassoc.com
Wed Apr 23 02:17:07 UTC 2008


I can't seem to find the magic incantation to enable rewrite in 
apache.  I have the following in my /etc/httpd/conf/http.conf file:

...
LoadModule rewrite_module modules/mod_rewrite.so
...
<VirtualHost *:80>
     ServerAdmin webmaster at foo.bar
     DocumentRoot /var/www/external/html
     ServerName www.foo.bar
     ErrorLog logs/www-error_log
     CustomLog logs/www-access_log combined

     RewriteEngine On
RewriteLog /tmp/rewrite-www.log
RewriteLevel 9
     RewriteCond %{HTTP_HOST}    !^www\.foo\.bar [NC]
     RewriteCond %{HTTP_HOST}    !^$
     RewriteRule           ^/(.*) http://www.foo.bar/$1 [L,R]
</VirtualHost>


I don't even get a rewrite log file with this, so I clearly have 
something basic wrong.  The rewritecond and rewrite rule were copied 
out of the apache docs.  This is apache 2.2.3 on CentOS 5.1.

The application of a cluestick would be much appreciated.  I've wasted 
far too much time on this.

thanks,
galen



More information about the PLUG mailing list