Skip to content

Commit

Permalink
Switch to RewriteEngine to allow redirection to the same host.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Dec 24, 2018
1 parent 32c81a1 commit c635811
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/default_vhost.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ NameVirtualHost *:{{ httpd_port }}
<VirtualHost *:{{ httpd_port }}>
ServerName {{ httpd_servername }}
DocumentRoot "{{ httpd_data_directory }}"
Redirect permanent / https://{{ httpd_servername }}
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>

0 comments on commit c635811

Please sign in to comment.