Is this htaccess code the best/proper way to:
- Send all http traffic to https
- Send any visits to index.php to the URL that doesn't show "index.php"
- Send all non-www traffic to www
This code works to do those things I mentioned, I just want to make sure it's the most proper/efficient way to do it and/or it's ordered correctly...
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ https://www.example.com/$1 [R=301,L]
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ https://www.example.com/$1 [r=301,nc]