httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Bray" <>
Subject Re: [users@httpd] mod_rewrite loaded, but not writing or logging
Date Mon, 20 Aug 2007 08:39:11 GMT
On 20/08/07, Peter Smith <> wrote:
> At this point, I'll be very happy with any rewriting of any sort - with
> virtual hosts or not - though, I'd eventually like to get it working with
> virtual hosts. Since I've destroyed my config files I'll probably start with
> a brand new Apache install (or at least a new httpd.conf), but here's what
> I've got right now in my httpd.conf in global context:
> RewriteEngine on
> RewriteLog c:\temp\rewrite.log
> RewriteLogLevel 7
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ [R=301,L]
> The <Directory...> section for document_root is currently in its
> post-install form.
> My virtual host entry:
>     <VirtualHost *:80>
>           ServerName
>           DocumentRoot "C:/Program Files/Apache Software
> Foundation/Apache2.2/vhosts/songsabout"
>             <Directory "C:/Program Files/Apache Software
> Foundation/Apache2.2/vhosts/songabout">
>                 Options Indexes FollowSymLinks MultiViews
>                 AllowOverride All
>                 Order allow,deny
>                 Allow from all
>             </Directory>
>     </VirtualHost>

That's likely your problem. If you have vhosts, by default mod_rewrite
won't be inherited from the main context. You can fix that by putting:

RewriteEngine On
RewriteOptions Inherit

.. in the vhost, but really you'll be better off putting your rules in
the vhost.

However, if you just want to send 404 requests to an external URL see
 Also, see this page for why matching REQUEST_URI in this context won't work.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message