.htaccess forcing https with consequences

Permalink
Hi all,

I found in the forums the way to force https by changing the .htaccess contents to:

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteCond %{HTTP_HOST} ^(www\.)(.+) [OR]
   RewriteCond %{HTTPS} off
   RewriteCond %{HTTP_HOST} ^(www\.)?(.+)
   RewriteRule ^ https://%2%{REQUEST_URI} [R=301,L]
   RewriteEngine On
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME}/index.html !-f
   RewriteCond %{REQUEST_FILENAME}/index.php !-f
   RewriteRule . index.php [L]
</IfModule>


This works fine for the https part but I was wondering how I make it NOT remove the www. part and also how to have it handle pretty URLS (remove index.php) as per normal?

I have ticked the pretty URLs feature in C5 however of course my editing of the htaccess file as changed that settings output.

Apologies, I've not had much experience in working with htaccess files.

View Replies: