Website URL
Error Message
(Just need to confirm if this file looks good.)
Other Information
(Can you please look at this and tell me if the file is setup correctly? I followed the tutorial to force HTTP)
(Just need to confirm if this file looks good.)
(Can you please look at this and tell me if the file is setup correctly? I followed the tutorial to force HTTP)
Hi and welcome to the forum! You shouldn’t add any more directives between the # BEGIN WordPress
and # END WordPress
lines other than the ones WordPress or another plugin adds, as they will be overwritten in a future WordPress configuration change, upgrade or when a plugin needs to write to the .htaccess
file through WordPress. Instead, you should place those lines you added either before or after those two comments.
I just copy pasted this from a tutorial
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:CF-Visitor} !{“scheme”:“https”}
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Even though this (RewriteEngine) thingy is already written above by default. I don’t know which one to keep or keep them both.
If you put the custom directives before the beginning comment, you should keep them both, even because if you edit the lines between the start and end comments they will be overwritten; if after the ending comment I don’t know if the rules that follow will be executed or not, so you might need to keep only the one in the WordPress permalink rewrites.
Now you should be good to go, so save and try to see if the redirect from HTTP works.
Unfortunately I’m unable to check because website is not opening. I recently created this website, was editing and then went out for a few hours. When I came back site stopped working. Not sure when will it start working again.
I was able to do your part as well and the redirect works fine. Anyway, it might take up to 72 hours for your website to work on your side due to DNS caching:
Though that’s strange, as you had it working before you went out…
Yes it was working just fine, after installing SSL certificate it kept on working fine while I was editing general settings in wp-admin.
Guess I should wait then for 72 hours. But I don’t understand when it was working fine why it isn’t working now.
What should be done in this case?
Just remove the second RewriteEngine On
line on line 12. I’m not 100% sure, but I think having the line twice results in the previous rules being reset, which is not what you want.
I am unable to make changes online, editor doesn’t remove anything. I tried making changes after downloading the file, but when I’m reuploading it’s throwing error FTP quota exceeded.