I'm having a bit of trouble with my htaccess file when trying to redirect http to https. I've looked at other question on stack and i've tried to implement them to see if it will sort my problem but nothing has worked as of yet
I'm trying to do a redirect using htaccess to say that if its http:// then redirect to https://
Here is my original htaccess rule that i'm trying to modify for this to work with https
# Get rid of www.
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
#route to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
Can anyone shine a light on what I need to do for this to work, every attempt i've done seems to cause a server error
Regards
Luke