Page 1 of 1

can't get mod_rewrite to work

Posted: Tue Jan 30, 2007 1:15 am
by Luke
From what I've read, mod_rewrite is compiled in by default, but when I do "apache2ctl -l", I get:

Code: Select all

Compiled in modules:
  core.c
  mod_access.c
  mod_auth.c
  mod_log_config.c
  mod_logio.c
  mod_env.c
  mod_setenvif.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_negotiation.c
  mod_dir.c
  mod_alias.c
  mod_so.c
So I add "LoadModule mod_rewrite /usr/lib/apache2/modules/mod_rewrite.so" to my apache2.conf file, but then when I restart apache, I get this error:
Syntax error on line 393 of /etc/apache2/apache2.conf:
Can't locate API module structure `mod_rewrite' in file /usr/lib/apache2/modules/mod_rewrite.so: /usr/lib/apache2/modules/mod_rewrite.so: undefined symbol: mod_rewrite
I've done a bit of searching around and come up with basically nothing. Any insight would be greatly appreciated.

Posted: Tue Jan 30, 2007 3:10 am
by dude81
Firstly see the permissions on that module. otherwise try this

Anyhow generally rewrite is compiled but you need to enable it

Code: Select all

./configure --help
will show how it enable rewrite like

Code: Select all

--enable-rewrite

Posted: Wed Jan 31, 2007 6:55 pm
by RobertGonzalez
Undefined symbols can be any one of a number of head scratching craptastic mysteries. Is the mod_rewrite module on your system? Are you logged in as root when modifying your httpd.conf? What distro is this on?