OVHcloud Community

Welcome to your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

HTTP > HTTPS Redirect


#1

Hi

I have enabled SSL on my domain which is working fine but I’m trying to redirect all http traffic to https. I’ve read this guide (https://docs.ovh.com/gb/en/hosting/htaccess_url_rewriting_using_mod_rewrite/) and added the following to the .htaccess in my root folder but it’s not working.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

I suspect I just need to restart apache but I can’t see how to do that. Can anyone tell me what I’m doing wrong please?

Cheers