[SATLUG] When rewrite doesn't
Mike
mzilla1101 at gmail.com
Thu Feb 1 18:30:57 CST 2007
I am very new to mod_rewrite and I can't get anything to work. I am using a
fresh install of Apache 2.0.59. I stuck the following two lines at the
bottom of httpd.conf:
RewriteEngine On
RewriteRule ^old\.html$ new.html
I have two files in my document root, old.html and new.html. However, when
I view old.html, I see the contents of old.html rather than new.html. There
is no rewrite being performed at all. If I remove old.html and try to
access it, I get the standard Apache 404 message saying that old.html isn't
available. Again, the rewrite rule isn't being picked up.
The mod_rewrite.so is in the modules directory and being loaded via
LoadModule. Apache doesn't complain about the syntax of httpd.conf so it
must know that RewriteEngine and RewriteRule are valid. Nevertheless, I
can't get even this most basic of rules to work. I'm sure it must be
something simple, but I can't find it and the hoards of documentation out
there are no help. All of it just says "Add RewriteEngine and RewriteRule
and it just magically works."
TIA,
Mike
More information about the SATLUG
mailing list