- 335 views
Locate "RewriteEngine on" line
Find the code line:
RewriteEngine on
Paste the snipplet below the line
This part is easy, to redirect your Drupal 8 installation to non-WWW SSL enabled website, paste the snipplet below the RewriteEngine on line .
# Redirect to HTTPS RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
This code is universal and you do not need to change anything in it.
Done!
Easy as that. You do not need to change anything in Drupal database. Drupal is clever enough to make things work out of the box.