Redirect HTTP to HTTPS while including subdirectory/file
I am having trouble redirecting http://tix.kiwi/atd (or any folder/file) to https://tix.kiwi/atd. It appears to redirect to https://tix.kiwiatd instead - which of course isn't even a valid domain.
This is the code I'm using:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^tix\.kiwi [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}
I've restarted apache, and I've also tried to look at my apache error log, but nothing shows up when logging is enabled via:
LogLevel alert rewrite:trace8
Try this in your .htaccess instead: