projects
/
chef.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
663750c
)
Redirect mediawiki requests to the primary site name
author
Tom Hughes
<tom@compton.nu>
Sun, 19 Apr 2015 16:49:06 +0000
(17:49 +0100)
committer
Tom Hughes
<tom@compton.nu>
Sun, 19 Apr 2015 16:58:54 +0000
(17:58 +0100)
cookbooks/mediawiki/templates/default/apache.erb
patch
|
blob
|
history
diff --git
a/cookbooks/mediawiki/templates/default/apache.erb
b/cookbooks/mediawiki/templates/default/apache.erb
index 0bedf21248d758bc8932c006c47e3761c42cf7e9..7aed4b3e71139acc3780a2ae9b0159baf700e835 100644
(file)
--- 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
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
RedirectMatch 301 ^/$ /wiki/Main_Page
#Historical Compatibility Links