However, I've run into a problem when trying to remove the /index.php from the end of the URL. All my other sites are on Liquid Web and I have a piece of code I use in .htaccess each time that works flawlessly. However, with SG, it causes the site not to display the internal pages (yes, I have the toggle set under site config!!

The code I usually use is:
Code: Select all
#### Force HTTPS://WWW and remove trailing / from files ####
## Turn on rewrite engine
RewriteEngine on
# Remove trailing slash from non-filepath urls
RewriteCond %{REQUEST_URI} /(.+)/$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ https://www.sitename.com/%1 [R=301,L]
# Include trailing slash on directory
RewriteCond %{REQUEST_URI} !(.+)/$
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+)$ https://www.sitename.com/$1/ [R=301,L]
# Force HTTPS and WWW
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [OR,NC]
RewriteCond %{https} off
RewriteRule ^(.*)$ https://www.sitename.com/$1 [R=301,L]