I ran into this issue as well moving to opensuse leap from another distribution. There was more than one problem.
Even if rewrite_module is listed in loadmodule.conf, this file is not not read without a change to httpd.conf. You can check if the module is loaded with
apache2ctl -M
As is posted elsewhere Options and AllowOverride arguments need to be placed within the relevant Directory tags.
If there is a subdirectory of the webserver, there needs to be a RewriteBase argument given in the .htaccess file.
Try this to get things working:
Try this to get things working:In file /etc/apache2/default-server.conf
In file /etc/apache2/default-server.conf
WithinWithin the <Directory>
tags add or edit the Options and AllowOverride lines to
Options All
AllowOverride All
##In file /etc/apache2/loadmodule.conf addIn file /etc/apache2/loadmodule.conf add
LoadModule rewrite_module /usr/lib64/apache2-prefork/mod_rewrite.so
##In file /etc/apache2/httpd.conf uncomment the IfDefine tags #<IfDefine !SYSCONFIG> Include /etc/apache2/loadmodule.conf #In file /etc/apache2/httpd.conf uncomment the IfDefine tags
#<IfDefine !SYSCONFIG>
Include /etc/apache2/loadmodule.conf
#</IfDefine>
##In file /srv/www/htdocs/NAMEOFYOURSUBDIRECTORYHERE/.htaccess add a line
RewriteBase /NAMEOFYOURSUBDIRECTORYHERE
In file /srv/www/htdocs/NAMEOFYOURSUBDIRECTORYHERE/.htaccess add a line
RewriteBase /NAMEOFYOURSUBDIRECTORYHERE
##Check if the configuration file "Syntax is OK." ItCheck if the configuration file "Syntax is OK."
It will probably complain that some modules have already been loaded, but that's alright.
apache2ctl configtest
##Restart ApacheRestart Apache
systemctl stop apache2; sleep 5; systemctl start apache2