httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Smith <>
Subject [users@httpd] mod_rewrite loaded, but not writing or logging
Date Mon, 20 Aug 2007 08:26:27 GMT

mod_rewrite doesn't seem to be working. I'm running Apache/2.2.4 (Win32) PHP/5.2.3, and mod_rewrite
appears to be loaded (according to phpinfo() and httpd -t -D DUMP_MODULES).

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>

          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

The rewrite.log is created, but never written to. No rewriting ever seems to take place. If
a file does not exist, I get a 404. If it does, I get the proper file. But I never get redirected
to, regardless the permutation of RewriteRules and RewriteConds I use.

I could not find good documentation for RewriteLogLevel. The docs saying 9 or higher should
log almost everything - I am guessing that only if it's actually matching a URL?

I just upgraded from Apache 2.0.53, so had probs with 'permission denied', until I hacked
up my httpd.conf, along with my vhosts file, but now I've reset my httpd.conf and hacked up
my vhosts include file sufficiently to get around those early 'permission denied' probs.

Aside from the obvious, 'What am I doing wrong?', there is the question, is it possible to
have mod_rewrite log why it is _not_ doing anything? Presumably it must be looking at incoming
URLs and deciding that they don't match. I've tried a couple of the suggestions in the forums
here - enabling stuff, moving directives to httpd.conf out of my 'included' vhosts file, prepending
the 'RewriteCond %{REQUEST_FILENAME}' lines with full directory paths, with and without quotes,
always restarting the server, but nada.

Thanks for any hints!

Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.
View raw message