1. Edit the "/etc/sysconfig/apache2" file
Find Apache_modules and you should find a line like
apache_modules="actions alias Auth_basic authn_file authz_host authz_groupfile authz_core authz_user AutoIndex CGI dir env expires include log_config MIME negotiation setenvif SSL SOCACHE_SHMCB userdir reqtimeout Authn_core PHP7 php5 version"
2. Add "Rewrite" in this line of "",
Such as:
apache_modules="actions alias Auth_basic authn_file authz_host authz_groupfile authz_core authz_user AutoIndex CGI dir env expires include log_config MIME negotiation setenvif SSL SOCACHE_SHMCB userdir reqtimeout Authn_core PHP7 php5 version rewrite"
3. Run sudo systemctl restart apache2 restart Apache2
Now Apache2 rewrite has been enabled.
4. Edit the /etc/apache2/default-server.conf file using your favorite editor
5. Find allowoverride-This should be in <directory "/srv/www/htdocs" > below
6. Modify allowoverride None to allowoverride all
7. Save file changes and exit
8. Run sudo systemctl restart apache2 restart Apache2
You can write the following in a info.php file in/srv/www/htdocs, using your favorite editor:
<? PHP Phpinfo ();? >
Save file modification and exit, use browser Browse such as: http://localhost/info.php, find rewrite, you should be able to find it in the page, description rewrite enabled.
Reference Links:
- Enable mod_rewrite on SuSE Linux
- Enable Apache mod_rewrite Module on OpenSuSE
- openSUSE configuration Apache rewrite allows access to the. htaccess file
Enable Apache Mod_rewrite in openSUSE