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?
"/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)".
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 thatRewriteEngine
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.
A simple phpinfo() will list the available modules.