uksz
uksz

Reputation: 18719

How to redirect traffic from http to https?

I bought domain with SSL certificate. However, users can access both http://xxxx.com and https://xxxx.com. How can I assure, that users are redirected from http to https?

Upvotes: 0

Views: 40

Answers (1)

RigidBody
RigidBody

Reputation: 664

In your .htaccess file look for how it's being attempted now and modify/add:

RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://xxxx.com/$1

Upvotes: 1

Related Questions