Problems running mod_rewrite
Hi guys. I have rh 9.0 and am running apache 1.3.27. I want to force all connections to my webserver to be https and read that mod_rewrite works well in this instance. After messing with my httpd.conf file, I finally got my webserver to recognize my .httaccess file (before it was just ignoring it). However, rewrites don't work.
Specifically, I get an internal server error as soon as I even try and include the line
RewriteEngine on
with the message being
Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration
So I did some more research and realized that I have to load the module to use it (kinda makes sense, right?). So I included the following three lines
LoadModule rewrite_module modules/mod_rewrite.so
ClearModuleList
AddModule mod_rewrite.c
When I try to restart apache, I get
Syntax error on line 479 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/modules/mod_rewrite.so into server: /usr/local/apache/modules/mod_rewrite.so: cannot open shared object file: No such file or directory
So I did a locate for mod_rewrite.so and found it under /usr/lib/httpd/modules. So I changed the load statement to
LoadModule rewrite_module /usr/lib/httpd/modules/mod_rewrite.so
That gave me
Syntax error on line 479 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/lib/httpd/modules/mod_rewrite.so into server: /usr/lib/httpd/modules/mod_rewrite.so: undefined symbol: apr_pool_cleanup_null
./apachectl startssl: httpd could not be started
I also tried using the first loadmodule statement and placing a sym link which gave me the second error. Does anybody know what's up? I installed apache from tarball and I have DSO support. Thanks in advance.
|