• 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 https (using cloudflare)

maximus

Chevereto Member
I try force https by default, but there is problem anytime.

First I try:
1. Read the documentation at https://chevereto.com/docs/cloudflare section force https
2. Continue with steps 1-5

Then I open website and default protocol is http. This mean no effect is there.

Second I try:
1. Edit .htaccess file

Orginally it looks like:
# Disable server signature
ServerSignature Off

# Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
Options -Indexes
Options -MultiViews
Options +FollowSymLinks

<IfModule mod_rewrite.c>

RewriteEngine On
# If you have problems with the rewrite rules remove the "#" from the following RewriteBase line
# You will also have to change the path to reflect the path to your Chevereto installation
# If you are using alias is most likely that you will need this.
#RewriteBase /

# 404 images
# If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRule lines
# Make sure to apply the correct paths to reflect your current installation
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]

</IfModule>


Edited file:
# Disable server signature
ServerSignature Off

# Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
Options -Indexes
Options -MultiViews
Options +FollowSymLinks

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}


# If you have problems with the rewrite rules remove the "#" from the following RewriteBase line
# You will also have to change the path to reflect the path to your Chevereto installation
# If you are using alias is most likely that you will need this.
#RewriteBase /

# 404 images
# If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRule lines
# Make sure to apply the correct paths to reflect your current installation
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]

</IfModule>


This couse:
- no forcing HTTPS, it stay HTTP
- all the files (except html code) has redirect loop and cannot be shown

Description:
I use Amazon AWS with http requests.
The link looks like:
http://st01.domain.com/2015/04/24/image.jpg
Storages prefix: st01 ... st99

Can somebody help me with solution?
Thank you.
 
I use this in my .htaccess and it works fine
Code:
  RewriteCond %{HTTPS} !=on
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
I use this in my .htaccess and it works fine
Code:
  RewriteCond %{HTTPS} !=on
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I add it after RewriteEngine On and this make error: This webpage has a redirect loop - ERR_TOO_MANY_REDIRECTS.
Do you use cloudflare?

When I access with typed https://... anything work fine.

PS: How do you configure https, for example this link: https://str.your-pictionary.com/2015/03/15/Anime_HD_Wallpaper_4K-900.jpg
Do you use Amazon AWS S3?

Thank you for answer
 
This is my whole .htaccess which works with cloudflare.
# Disable server signature
ServerSignature Off

# Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
Options -Indexes
Options -MultiViews
Options +FollowSymLinks

<IfModule mod_rewrite.c>

RewriteEngine On

# If you have problems with the rewrite rules remove the "#" from the following RewriteBase line
# You will also have to change the path to reflect the path to your Chevereto installation
# If you are using alias is most likely that you will need this.
#RewriteBase /

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# 404 images
# If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRu$
# Make sure to apply the correct paths to reflect your current installation
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|bm$
RewriteRule . index.php [L]

</IfModule>

I do not use Amazon, I use my own servers
 
From cloudflare:

Code:
;; A Records (IPv4 addresses)
www.domain.tld.    300    IN    A    37.1.0.0
domain.tld.    300    IN    A    37.1.0.0
mail1.domain.tld.    300    IN    A    37.2.0.1
mail2.domain.tld.    300    IN    A    37.2.0.2
*.domain.tld.    300    IN    A    37.1.0.0

Code:
;; CNAME Records
st01.domain.tld.    300    IN    CNAME    xxx.cloudfront.net.
yyy.domain.tld.    300    IN    CNAME    zzz.comodoca.com.
 
No, just 2 redirects. 1. to the www. the 2nd to https. But you are right, I can redirect directyl to https to save 1 redirect.

Do you use a own server or shared hosting?

Sure, two redirects. Right, but in me case is after this redirects - redirect loop.
I use hosting company. No my own server.

Thank you for assistance.
 
The first one: redirect loop
But it seems conditions past, becouse i have www and https also.

Second: redirect loop
Curiosly i test it with www.example.com and this redirect me there with no problem.

I think there must be something bad after htaccess, maybe cloudflare and chevereto or in chevereto (some setting maybe).
 
I really cannot find the solution.
I haven't any mod, I use cloudflare and in admin area is it set up. Maybe i try at last contact webhosting support, but i think there isn't problem.

Anyway thank you for assistance, maybe someone have an idea for this.
 
You don't need to add https redirect at server level, you need to do it all using CloudFlare page rules.
 
You don't need to add https redirect at server level, you need to do it all using CloudFlare page rules.

How? :)
The documentatin cannot help me.

Meanwhile I contact me webhosting provider and he sad, the cloudflare redirect me to bad server (104.31.71.189) not 30....
I try investigate what is clodflare 104.31.71.189 server.
 
Where it reads "Force HTTPS" https://chevereto.com/docs/cloudflare

By the way, this has nothing to do with Chevereto because this is related to CloudFlare/Server config.

The fact that I wrote a documentation about it was because people didn't read the CloudFlare documentation but I'm seeing that the Chevereto docs are also not being read.
 
Force HTTPS
By default CloudFlare HTTPS doesn't force all the traffic to HTTPS. To force HTTPS do the following:

  • Go to your websites
  • Click on the gear icon and select "Page rules"
  • Enter your website in the URL pattern input
  • Toggle the "Always use HTTPS" switch
  • Click on "Add rule" at the bottom
By doing this all the traffic of your website will use HTTPS. When someone access your website using HTTP, CloudFlare will redirect those request to HTTPS.
 
use like this

Code:
http://*site.com/*

and turn on always use https

then save
 
Back
Top