From 1de079954b9e8291bde5f119c9e6bef69c682d12 Mon Sep 17 00:00:00 2001 From: Alex Gibson Date: Fri, 13 Nov 2015 10:59:27 +0000 Subject: [PATCH] [fix bug 1221739] Add a redirect for Hello's Feedback survey links --- bedrock/firefox/redirects.py | 10 ++++++++++ bedrock/mozorg/redirects.py | 5 ----- etc/httpd/global.conf | 3 +++ test_redirects/map_globalconf.py | 10 ++++++++++ 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/bedrock/firefox/redirects.py b/bedrock/firefox/redirects.py index d15337e6f28..28cd8279c53 100644 --- a/bedrock/firefox/redirects.py +++ b/bedrock/firefox/redirects.py @@ -121,6 +121,16 @@ def firefox_mobile_faq(request, *args, **kwargs): # bug 1121082 redirect(r'^hello/?$', 'firefox.hello'), + # Bug 1186373 + redirect(r'^firefox/hello/npssurvey/?$', + 'https://www.surveygizmo.com/s3/2227372/Firefox-Hello-Product-Survey', + permanent=False), + + # Bug 1221739 + redirect(r'^firefox/hello/feedbacksurvey/?$', + 'https://www.surveygizmo.com/s3/2319863/d2b7dc4b5687', + permanent=False), + # bug 1148127 redirect(r'^products/?$', 'firefox.family.index'), diff --git a/bedrock/mozorg/redirects.py b/bedrock/mozorg/redirects.py index c9150d7e49b..247ab984829 100644 --- a/bedrock/mozorg/redirects.py +++ b/bedrock/mozorg/redirects.py @@ -153,11 +153,6 @@ def decider(request, **kwargs): 'styleguide.communications.copy-rules'), redirect(r'^firefox/brand/downloads/?$', 'styleguide.home'), - # Bug 1186373 - redirect(r'^firefox/hello/npssurvey/?$', - 'https://www.surveygizmo.com/s3/2227372/Firefox-Hello-Product-Survey', - permanent=False), - # Bug 1071318 redirect(r'^firefox/mobile/?$', 'firefox.android.index'), diff --git a/etc/httpd/global.conf b/etc/httpd/global.conf index 818aacd0428..0f7175f4d32 100644 --- a/etc/httpd/global.conf +++ b/etc/httpd/global.conf @@ -208,6 +208,9 @@ RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/hello(/?)$ /b/$1firefox/hello$2 [PT] # bug 1186373 RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/hello/npssurvey(/?)$ /b/$1firefox/hello/npssurvey$2 [PT] +# bug 1221739 +RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/hello/feedbacksurvey(/?)$ /b/$1firefox/hello/feedbacksurvey$2 [PT] + # bug 1071074 RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/channel(/?)$ /b/$1firefox/channel$2 [PT] diff --git a/test_redirects/map_globalconf.py b/test_redirects/map_globalconf.py index ae1d02b7d7d..ae26cac0ff2 100644 --- a/test_redirects/map_globalconf.py +++ b/test_redirects/map_globalconf.py @@ -898,4 +898,14 @@ # bug 442671 url_test('/foundation/trademarks/l10n-policy/', '/foundation/trademarks/'), + + # Bug 1186373 + url_test('/firefox/hello/npssurvey/', + 'https://www.surveygizmo.com/s3/2227372/Firefox-Hello-Product-Survey', + status_code=302), + + # Bug 1221739 + url_test('/firefox/hello/feedbacksurvey/', + 'https://www.surveygizmo.com/s3/2319863/d2b7dc4b5687', + status_code=302), ))