Dzahn has submitted this change and it was merged.

Change subject: static-bz: rewrite /show_bug.cgi to static HTML
......................................................................


static-bz: rewrite /show_bug.cgi to static HTML

Rewrite old '/show_bug.cgi?id=12345' URLs on static-bugzilla.wm to
bug12345.html files.

Have to use QUERY_STRING and make it part of the rewrite target.

Internally (PT) so the URL appears to be like
back on original Bugzilla and users can simply replace "bugzilla"
with "old-bugzilla". Also make links work from activity pages.

Bug:T85140
Change-Id: I68e70e260ed83ed29fcb088d018cd43da52db2c4
---
M modules/bugzilla/templates/apache/static-bugzilla.wikimedia.org.erb
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git 
a/modules/bugzilla/templates/apache/static-bugzilla.wikimedia.org.erb 
b/modules/bugzilla/templates/apache/static-bugzilla.wikimedia.org.erb
index 77458da..28b5fc4 100644
--- a/modules/bugzilla/templates/apache/static-bugzilla.wikimedia.org.erb
+++ b/modules/bugzilla/templates/apache/static-bugzilla.wikimedia.org.erb
@@ -6,6 +6,10 @@
     ServerName static-bugzilla.wikimedia.org
     DocumentRoot /srv/org/wikimedia/static-bugzilla
 
+    RewriteEngine On
+    RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
+    RewriteRule ^/show_bug.cgi$ /bug%1.html? [PT]
+
     <Directory />
         Options FollowSymLinks
         AllowOverride None

-- 
To view, visit https://gerrit.wikimedia.org/r/190132
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I68e70e260ed83ed29fcb088d018cd43da52db2c4
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Aklapper <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: John F. Lewis <[email protected]>
Gerrit-Reviewer: Qgil <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to