Enable HSTS and make sure everything is HTTPS
-
@phenomlab Yes, if I set a page rule it used to work.
Now shall I set a page rule for www at cloud flare (I don’t want to do it)
I am guessing a www. Redirection at ask folder ht acess would resolve the issue.
-
@phenomlab Yes, if I set a page rule it used to work.
Now shall I set a page rule for www at cloud flare (I don’t want to do it)
I am guessing a www. Redirection at ask folder ht acess would resolve the issue.
@hari said in Enable HSTS and make sure everything is HTTPS:
I am guessing a www. Redirection at ask folder ht acess would resolve the issue.
It should, yes. Did you create one previously, and it was ignored ?
-
@hari said in Enable HSTS and make sure everything is HTTPS:
I am guessing a www. Redirection at ask folder ht acess would resolve the issue.
It should, yes. Did you create one previously, and it was ignored ?
@phenomlab No, erlier I used to manage it using CF page rule (all in one rule https and www.) . Now as we switch to HSTS and there is a setting at CF as make sure every page is https it is taking care of http to https redirection so turned of page rules.
Could you suggest me the ht access rule for ask folder only
I have posted my ask folder ht access in my first post of this discussion
-
@phenomlab No, erlier I used to manage it using CF page rule (all in one rule https and www.) . Now as we switch to HSTS and there is a setting at CF as make sure every page is https it is taking care of http to https redirection so turned of page rules.
Could you suggest me the ht access rule for ask folder only
I have posted my ask folder ht access in my first post of this discussion
@hari So to confirm, you want all requests to this URL to be converted to https://www.domain.com ?
-
@hari So to confirm, you want all requests to this URL to be converted to https://www.domain.com ?
@phenomlab all WordPress installations for domain or subdirectory is properly getting redirected to www. so i don’t want to add any rules in main ht access
i want all requests to “ask” folder to be converted to www. https://www.domain.com/ask
only flarum is not doing www. redirection
if writing a global rule is the right approach i will try that
-
@phenomlab all WordPress installations for domain or subdirectory is properly getting redirected to www. so i don’t want to add any rules in main ht access
i want all requests to “ask” folder to be converted to www. https://www.domain.com/ask
only flarum is not doing www. redirection
if writing a global rule is the right approach i will try that
@hari You should leverage the
.htaccess
inside the Flarum root directory and not touch anything else. If you set the forward here, it should work as planned.Let me know if you need any help.
-
@hari You should leverage the
.htaccess
inside the Flarum root directory and not touch anything else. If you set the forward here, it should work as planned.Let me know if you need any help.
@phenomlab yes i want you to suggest/modify this for me
RewriteCond %{HTTP_HOST} ^yourdomain.com/ask [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/ask/$1 [L,R=301] if i use this line in the subdirectory (flarum) it will redirect to to http?
could you suggest me a line which only modify non www to www and doent touch the https or http thing since DNS is taking care of it.
-
@phenomlab yes i want you to suggest/modify this for me
RewriteCond %{HTTP_HOST} ^yourdomain.com/ask [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/ask/$1 [L,R=301]
if i use this line in the subdirectory (flarum) it will redirect to to http?
could you suggest me a line which only modify non www to www and doent touch the https or http thing since DNS is taking care of it.
@hari said in Enable HSTS and make sure everything is HTTPS:
RewriteRule ^(.*)$ http://www.yourdomain.com/ask/$1 [L,R=301]
Before we do that, shouldn’t
RewriteRule ^(.*)$ http://www.yourdomain.com/ask/$1 [L,R=301]
Actually be
RewriteRule ^(.*)$ https://www.yourdomain.com/ask/$1 [L,R=301]
?
-
@hari said in Enable HSTS and make sure everything is HTTPS:
RewriteRule ^(.*)$ http://www.yourdomain.com/ask/$1 [L,R=301]
Before we do that, shouldn’t
RewriteRule ^(.*)$ http://www.yourdomain.com/ask/$1 [L,R=301]
Actually be
RewriteRule ^(.*)$ https://www.yourdomain.com/ask/$1 [L,R=301]
?
@phenomlab nope it’s not working - added these lines in ask direcotry htacess
RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com/ask [NC] RewriteRule ^(.*)$ https://www.domain.com/ask/$1 [L,R=301] tried to redirect at main folder too but its not redirecting to www for ask
RewriteCond %{HTTP_HOST} ^domain.com/ [NC] RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301] let me try CF page rule
-
@phenomlab nope it’s not working - added these lines in ask direcotry htacess
RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com/ask [NC] RewriteRule ^(.*)$ https://www.domain.com/ask/$1 [L,R=301]
tried to redirect at main folder too but its not redirecting to www for ask
RewriteCond %{HTTP_HOST} ^domain.com/ [NC] RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]
let me try CF page rule
-
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (ether email, or push notification). You'll also be able to save bookmarks, use reactions, and upvote to show your appreciation to other community members.
With your input, this post could be even better 💗
RegisterLog in