Answers for "redirect to https apache2 ubuntu"

2

apache redirect http to https

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
Posted by: Guest on December-21-2020
1

apache redirect www to non-www

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
    RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
</IfModule>
Posted by: Guest on December-21-2020
-1

redirect http to https apache2 ubuntu 20.04

HTTP Redirection
Posted by: Guest on November-14-2020

Browse Popular Code Answers by Language