X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/663750c10bc7ac3d422b08055485be7819671086..27d743a7835e5d1f2d8899a7f616809b40a2d2c5:/cookbooks/mediawiki/templates/default/apache.erb?ds=sidebyside 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