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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This question was answered by @sierracircle:
Try this in your .htaccess instead:
#force https RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.