• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Force redirect to https

afternov

Chevereto Member
Hello,

I would love to know, how to force redirect http to https using htaccess?
The following configuration what im using to all may other websites does not work, i get the "ERR_TOO_MANY_REDIRECTS" error.:
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Thanks!
 
Last edited:
Virtual host from my server. Copy what you need ...


Code:
<VirtualHost YOUR.IP.ADDRESS:80>
ServerName YOURDOMAIN.COM
ServerAlias www.YOURDOMAIN.COM
Redirect permanent / https://YOURDOMAIN.COM/
</VirtualHost>

<VirtualHost YOUR.IP.ADDRESS:443>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/YOURDOMAIN.COM.crt
SSLCertificateKeyFile /etc/ssl/private/YOURDOMAIN.COM.key
SSLCertificateChainFile /etc/ssl/certs/Comodo_PositiveSSL_CA_bundle_SHA256.crt
SSLProtocol All -SSLv2 -SSLv3
SSLCompression off
SSLHonorCipherOrder On
SSLCipherSuite EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
Header add Strict-Transport-Security "max-age=15768000"
ServerSignature On
DocumentRoot "/YOUR/ROOT/PATH/YOURDOMAIN.COM"
ServerName YOURDOMAIN.COM
ServerAlias www.YOURDOMAIN.COM
ErrorLog /YOUR/ROOT/PATH/YOURDOMAIN.COM/log_error.log
CustomLog /YOUR/ROOT/PATH/YOURDOMAIN.COM/log_access.log common
<Directory "/YOUR/ROOT/PATH/YOURDOMAIN.COM">
FileETag None
Header unset ETag
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month 1 days"
ExpiresByType text/html "access plus 1 month 1 days"
ExpiresByType image/gif "access plus 1 month 1 days"
ExpiresByType image/jpeg "access plus 1 month 1 days"
ExpiresByType image/png "access plus 1 month 1 days"
ExpiresByType text/css "access plus 1 month 1 days"
ExpiresByType text/javascript "access plus 1 month 1 week"
ExpiresByType application/x-javascript "access plus 1 month 1 days"
ExpiresByType text/xml "access plus 1 seconds"
</IfModule>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
ExpiresActive On
ExpiresDefault "access plus 1 year"
</FilesMatch>
ServerSignature Off
Options -Indexes
Options -MultiViews
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule images/.+\.(gif|jpe?g|png|bmp) - [NC,L,R=404]
#RewriteRule images/.+\.(gif|jpe?g|png|bmp) content/images/system/404.gif [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpe?g|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
RewriteRule . index.php [L]
RewriteCond %{HTTP_HOST} !=YOURDOMAIN.COM
RewriteRule (.*) https://YOURDOMAIN.COM/$1 [R=301,L]
Order allow,deny
Allow from all
Deny from env=spammer
Deny from env=BlockCountrySocial
RewriteCond %{HTTP_USER_AGENT} ^-?$
RewriteRule ^ - [F]
</Directory>
</VirtualHost>
 
o sh*** i forgot that im using cloudflare, lol!

Thanks for reply!

Code:
RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'
RewriteRule ^(.*)$ https://website.com/$1 [L]
 
I use this one at chevereto.com

Code:
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{SERVER_PORT} 80
RewriteRule .? https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
Back
Top