Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/311648
Change subject: Replace repeated UseMod rewrites in apache config with existing include ...................................................................... Replace repeated UseMod rewrites in apache config with existing include Change-Id: I69b04931029099962c66df32dbf952176dd1e359 --- M modules/mediawiki/files/apache/sites/main.conf M modules/mediawiki/files/apache/sites/remnant.conf 2 files changed, 9 insertions(+), 45 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/48/311648/1 diff --git a/modules/mediawiki/files/apache/sites/main.conf b/modules/mediawiki/files/apache/sites/main.conf index 92d65c2..1516ae9 100644 --- a/modules/mediawiki/files/apache/sites/main.conf +++ b/modules/mediawiki/files/apache/sites/main.conf @@ -34,11 +34,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - - # UseMod compatibility URLs - RewriteCond %{QUERY_STRING} ([^&;]+) - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] + Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -134,11 +130,6 @@ Alias /wiki /srv/mediawiki/docroot/wiktionary.org/w/index.php RewriteRule ^/w/$ /w/index.php - # UseMod compatibility URLs - RewriteCond %{QUERY_STRING} ([^&;]+) - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] - # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -146,6 +137,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" + Include "sites-enabled/wikimedia-legacy.incl" # Variant aliases Alias /sr /srv/mediawiki/docroot/wiktionary.org/w/index.php @@ -196,11 +188,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - - # UseMod compatibility URLs - RewriteCond %{QUERY_STRING} ([^&;]+) - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] + Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -295,11 +283,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - - # UseMod compatibility URLs - RewriteCond %{QUERY_STRING} ([^&;]+) - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] + Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -361,11 +345,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - - # UseMod compatibility URLs - RewriteCond %{QUERY_STRING} ([^&;]+) - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] + Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -421,11 +401,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - - # UseMod compatibility URLs - RewriteCond %{QUERY_STRING} ([^&;]+) - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] + Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -480,11 +456,6 @@ Alias /wiki /srv/mediawiki/docroot/wikinews.org/w/index.php RewriteRule ^/w/$ /w/index.php - # UseMod compatibility URLs - RewriteCond %{QUERY_STRING} ([^&;]+) - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] - # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] @@ -492,6 +463,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" + Include "sites-enabled/wikimedia-legacy.incl" # Variant aliases Alias /sr /srv/mediawiki/docroot/wikinews.org/w/index.php @@ -544,11 +516,7 @@ Include "sites-enabled/api-rewrites.incl" Include "sites-enabled/public-wiki-rewrites.incl" - - # UseMod compatibility URLs - RewriteCond %{QUERY_STRING} ([^&;]+) - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] + Include "sites-enabled/wikimedia-legacy.incl" # Early phase 2 compatibility URLs RewriteRule ^/wiki\.phtml$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] diff --git a/modules/mediawiki/files/apache/sites/remnant.conf b/modules/mediawiki/files/apache/sites/remnant.conf index 9cb3103..1b2dba9 100644 --- a/modules/mediawiki/files/apache/sites/remnant.conf +++ b/modules/mediawiki/files/apache/sites/remnant.conf @@ -226,11 +226,7 @@ Alias /wiki /srv/mediawiki/docroot/usability/w/index.php Include "sites-enabled/public-wiki-rewrites.incl" - - # UseMod compatibility URLs - RewriteCond %{QUERY_STRING} ([^&;]+) - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php?title=%1 [R=301,L] - RewriteRule ^/wiki\.cgi$ %{ENV:RW_PROTO}://%{SERVER_NAME}/w/index.php [R=301,L] + Include "sites-enabled/wikimedia-legacy.incl" RewriteRule ^/math/(.*) %{ENV:RW_PROTO}://upload.wikimedia.org/math/$1 [R=301] -- To view, visit https://gerrit.wikimedia.org/r/311648 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69b04931029099962c66df32dbf952176dd1e359 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alex Monk <a...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits