redirect from http to https

MARIO11862
4 Posts
MARIO11862 posted this 04 January 2024
Ask a Question

Hi, I need to redirect all the pages of my site from http to https.
Can you help me in this passage?
Thanks

Hi, I need to redirect all the pages of my site from http to https. Can you help me in this passage? Thanks
Vote to pay developers attention to this features or issue.
2 Replies
Order By: Standard | Newest
njardim
5 Posts
njardim posted this 05 January 2024

Create an .htaccess file in the root of your website with the following content and everything will be redirect to https://your-domain.com:

RewriteEngine On
RewriteBase /
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.)$ https://your-domain.com/$1 [R=301,NE,L]
RewriteCond %{HTTP_HOST} ^www.
RewriteRule ^(.
)$ https://your-domain.com/$1 [R=301,NE,L]

Create an .htaccess file in the root of your website with the following content and everything will be redirect to https://your-domain.com: RewriteEngine On RewriteBase / RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://your-domain.com/$1 [R=301,NE,L] RewriteCond %{HTTP_HOST} ^www\. RewriteRule ^(.*)$ https://your-domain.com/$1 [R=301,NE,L]
MARIO11862
4 Posts
MARIO11862 posted this 05 January 2024

Thanks, where i can find the root? Sory for the basic question. Thanks

Thanks, where i can find the root? Sory for the basic question. Thanks
You must log in or register to leave comments