<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>htaccess on IT Quicktasks</title><link>https://quicktasks.ismael.casimpan.com/tags/htaccess/</link><description>Recent content in htaccess on IT Quicktasks</description><generator>Hugo -- gohugo.io</generator><copyright>Copyright © 2018–2022, Ismael Casimpan Jr.; All Rights Reserved</copyright><lastBuildDate>Mon, 09 Apr 2018 00:20:25 +0800</lastBuildDate><atom:link href="https://quicktasks.ismael.casimpan.com/tags/htaccess/index.xml" rel="self" type="application/rss+xml"/><item><title>Force http to https</title><link>https://quicktasks.ismael.casimpan.com/post/force-http-to-https/</link><pubDate>Mon, 09 Apr 2018 00:20:25 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/force-http-to-https/</guid><description>
1root@example.com:/var/www/sites/yoursite.example.com/www# git diff .htaccess 2diff --git a/www/.htaccess b/www/.htaccess 3index 440cabc..968f601 100644 4--- a/www/.htaccess 5+++ b/www/.htaccess 6@@ -93,6 +93,12 @@ DirectoryIndex index.php index.html index.htm 7# RewriteCond %{HTTP_HOST} !^www\. [NC] 8# RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 9# 10+ 11+ # Redirect HTTP to HTTPS 12+ RewriteCond %{HTTPS} off 13+ RewriteCond %{HTTP:X-Forwarded-Proto} !https 14+ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 15+ 16# To redirect all users to access the site WITHOUT the &amp;#39;www.&amp;#39; prefix, 17# (http://www.example.com/... will be redirected to http://example.</description></item><item><title>Pantheon site redirects</title><link>https://quicktasks.ismael.casimpan.com/post/pantheon-site-redirects/</link><pubDate>Sun, 08 Apr 2018 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/pantheon-site-redirects/</guid><description>
Pantheon.io hosted sites don't use htaccess. But there's an equivalent implementation via php. See https://pantheon.io/docs/redirects/</description></item></channel></rss>