I've got Apache 2 installed on a Suse machine. I've gone through its configuration files, checked out which modules are installed in Yast and even tried writing a rewrite rule in a .htaccess which doesn't work. I can't seem to find mod_rewrite anywhere.

I take it this mean that mod_rewrite is not installed? How can I find out for sure?

link|improve this question

feedback

3 Answers

up vote 5 down vote accepted

"/usr/sbin/httpd -l" will list your compiled-in modules, and "/usr/sbin/httpd -M" will list your included modules as per your current configuration file.

Naturally, you may have httpd in a different path.

Typically, the list of compiled-in modules is short, and the list of loaded modules somewhat longer. If it's in the list of loaded modules, it looks like "rewrite_module (shared)".

link|improve this answer
feedback

Drop a RewriteEngine On into the main config, and do a configtest. If it passes, mod_rewrite is installed (possibly built-in), if it errors out saying that RewriteEngine is an unknown directive, then it's not installed.

Also, I'd be surprised if the server error log didn't indicate that the htaccess file failed to run properly.

link|improve this answer
feedback

A simple phpinfo() will list the available modules.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.