Jump to content

Recommended Posts

Posted

UPDATE: This is the new .htaccess:

Header set Strict-Transport-Security "max-age=31536000" env=HTTPS

##### SSL #####
# Enable the Rewrite capabilities
RewriteEngine On

# Check if connection is not already HTTPS
RewriteCond %{HTTPS} off

# Whitelist well-known folder (AutoSSL)
RewriteCond %{REQUEST_URI} !^/.well-known

# Redirect users from their original location, to the same location but using HTTPS.
# i.e.  http://www.example.com/foo/ to https://www.example.com/foo/
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

But there is a permanent redirect error... what can I do?

Posted

Do something rename your.htaccess file to htaccess.txt once.

Site works but without htaccess rules there is no redirect

Posted

For https redirect:

 

For HTML:

 

(Add a meta tag)

 

< meta http-equiv="Refresh" content="0;URL=https://www.example.com" />

 

For PHP:

 

< ?php function redirectTohttps() { if($_SERVER['HTTPS']!=”on”) { $redirect= “https://”.$_SERVER['HTTP_HOST].$_SERVER['REQUEST_URI'];header(“Location:$redirect”); } } ?>

Check my this post.

Posted

No. As I posted in a previous post check what wolstech said.

 

EDIT: Also can you temporarily disable Cloudflare totally on your site.

Posted (edited)

What about WordPress? It gives the redirect error

Edited by maicol07
Posted

U mean disabling Cloudflare?

WordPress uses another htaccess in a subfolder to redirect users. The problem is that it gives the redirect error. I'm trying to set up a cloudflare page rule to exclude the .well-known folder

Posted

At this point, I would suggest disabling Cloudflare entirely. Why do you need it so much?

Hmm flazepe....I was too suggesting him that....HSTS can be set up manually too, you don't need Cloudflare for that.

Posted (edited)

At this point, I would suggest disabling Cloudflare entirely. Why do you need it so much?

Speed improvements. As servers is located in California and I'm in Italy, I think Cloudflare can speed up page loading time. So the feature I need is the CDN one

Edited by maicol07
Posted

Cloudflare and AutoSSL cannot coexist on our servers, so you may find yourself manually installing certificates if you use CF. Tommy is fast enough that you really don't need it anyway to be honest. It won't make much of a difference anyway unless you have lots of big pictures or something on them. It won't even help the speed of dynamic pages (php, etc.) because the scripts have to run every time they're visited. CF is more useful for Ricky and Johnny where the servers are painfully slow even for static content.

 

Also, when troubleshooting this sort of thing, it's best to forget about forcing https entirely and just get the site to accept the connection. Rename the htaccess and get everything else working first.

Posted

Ok, I've disabled cloudflare only for the updates subdomain to let AutoSSL issue the certificate. Now, if I go to updates.maicol07.it through plain HTTP it shows the Account Queued page...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...