X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/663750c10bc7ac3d422b08055485be7819671086..b88d6ea0fa7181ba138ef249a9a4aac0ce77c8a3:/cookbooks/mediawiki/templates/default/apache.erb diff --git a/cookbooks/mediawiki/templates/default/apache.erb b/cookbooks/mediawiki/templates/default/apache.erb index 0bedf2124..7aed4b3e7 100644 --- a/cookbooks/mediawiki/templates/default/apache.erb +++ b/cookbooks/mediawiki/templates/default/apache.erb @@ -28,6 +28,13 @@ php_value upload_max_filesize 70M php_value post_max_size 100M + RewriteCond %{SERVER_NAME} !=<%= @name %> +<% if port == 443 -%> + RewriteRule ^/(.*)$ https://<%= @name %>/$1 [R=permanent] +<% else -%> + RewriteRule ^/(.*)$ http://<%= @name %>/$1 [R=permanent] +<% end -%> + RedirectMatch 301 ^/$ /wiki/Main_Page #Historical Compatibility Links