Have you checked if your Apache server has mod_rewrite loaded? This needs to be loaded in the apache2,conf. Typically in Debian based distributions in root->etc->apache2->mods-enabled you need a rewrite.load like
. If you have this in there or in your main apache2.conf file and apache starts without errors then it should be loaded.
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
As you are using php you can also create a php page that has only:
or somewhere in one of the pages that you are trying to have a redirect to occur use:
Originally Posted by megashape