Apache Rewrite rule not working
Solution 1:
You have a configuration snippet /etc/httpd/conf.d/ssl_rewrite.conf
Typically such snippets get loaded by an Include
or IncludeOptional
directive
Include conf.d/*.conf
or
IncludeOptional conf.d/*.conf
from your main httpd.conf
.
The problem is that those snippets only apply to your main configuration and don't apply to any VirtualHost
sections...
Either include those settings in the virtual host definition, or load that snippet there:
<VirtualHost *:80>
ServerName www.thewhozoo.com
Include /etc/httpd/conf.d/ssl_rewrite.conf
</VirtualHost>
Or even better, don't use mod_rewrite and set:
<VirtualHost *:80>
ServerName www.thewhozoo.com
Redirect "/" "https://www.thewhozoo.com/"
</VirtualHost>