XF 1.5 Which is the .htaccess rules for use https and remove www?

malachiel

Active member
Hi i got a website with portal (www.trollandia.it) and forum in subfolder, and i want if user try to use www to redirect to website without www party, and still use https, i tried these rules, only the "https" seem to work, but www is still showed, where i am wrong?
Code:
    RewriteEngine On

    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://trollandia.it/community/$1  [R=301,L]

    RewriteCond %{HTTP_HOST} ^www.trollandia.it/community/$
    RewriteRule ^(.*) https://trollandia.it/community/$1  [QSA,L,R=301]

    RewriteCond %{HTTPS_HOST} ^www.trollandia.it/community/$
    RewriteRule ^(.*) https://trollandia.it/community/$1  [QSA,L,R=301]
 
Top Bottom