Answers for "ubuntu apache redirect http to https"

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
0

ubuntu apache redirect http to https

<VirtualHost *:80> 
  ServerName example.com
  ServerAlias www.example.com

  Redirect permanent / https://example.com/
</VirtualHost>

<VirtualHost *:443>
  ServerName example.com
  ServerAlias www.example.com

  Protocols h2 http/1.1

  <If "%{HTTP_HOST} == 'www.example.com'">
    Redirect permanent / https://example.com/
  </If>

  # SSL Configuration

  # Other Apache Configuration

</VirtualHost>
Posted by: Guest on September-12-2021
-1

redirect http to https apache2 ubuntu 20.04

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

Code answers related to "ubuntu apache redirect http to https"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language