can't get mod_rewrite to work

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

can't get mod_rewrite to work

Post 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.
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post 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
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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?
Post Reply