Im trying to put my SSL in my website but is getting quite impossible. I added too the code that recently had in the forum that is here attached. And after that I have this problem in the website
Used code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.(.)
RewriteRule ^.$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Once I added appear this:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
After that any page is working. Anyone knows How can I solve that? Cause I’m getting crazy.
With Forklift you can set it to show invisible items. Select the .htacces file and choose to open it with textedit (should be on your Mac) copy Flashman’s code and you should be good to go.
When an SSL certificate is added to your server, there is usually an option to have all request automatically direct to the secure version of the site - you shouldn’t have to get involved with editing the .htaccess file at all. I suggest you contact your host and have them set it up for you.
First, make sure you have an SSL certificate properly installed on your server. Check your website’s SSL settings are correctly configured.
Then update your code …
Ex…
RewriteEngine On
# Redirect www to non-www (if www is present)
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
# Force HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Now Test it redirects to the non-www version using a 301 (permanent) redirect.
Manually test Use browser developer tools to inspect network requests and redirects or use any online tool like https://redirectchecker.com/ This can help you to get detail redirection chain and its status code.