Closed Bug 495824 Opened 16 years ago Closed 11 years ago

Set up tests for our redirects

Categories

(www.mozilla.org :: General, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: davidwboswell, Unassigned)

References

(Blocks 1 open bug)

Details

Someone wrote in to the webmaster address recently to let us know one of our redirects isn't working: I found a redirection strange behaviour : Opening : http://mozilla.org/webtools …redirects to : http://cvs-www.mozilla.org/webtools …and leads to : "Address not found". Is there a way to test the redirects to make sure none of them are broken? Maybe we can also test to see if there are any duplicates, or redirects going through multiple hops, or test for other things? Part of this may also involve just cleaning up the .htaccess files to make them easier for us to spot errors and maintain them. Also not sure if this would be part of any larger tests to check for broken links in web pages or not.
Bug 496250 is another example of a broken redirect reported by someone.
I just noticed today that there are two different redirects in the main .htaccess file that seem to be doing the same thing in different ways: RewriteRule ^download http://www.mozilla.org/projects/ [R] RedirectMatch permanent /download(/.*)?$ http://www.mozilla.org/projects/ Perhaps this is something else that can be tested for and cleaned up.
When looking at the download redirects mentioned in comment #2 it looks like these are also causing a conflict with a redirect that includes 'download' in the URL. Redirect permanent /download-mozilla.html http://developer.mozilla.org/en/docs/Download_Mozilla_Source_Code The http://www.mozilla.org/download-mozilla.html link goes to http://www.mozilla.org/projects/ instead of the page on MDC. So based on these examples it looks like there are several things to test for: * Are redirects pointing to non-existant pages? * Are redirects being duplicated? * Are redirects going to an existant page but not the one intended?
At a recent weekly update there was a mention of an automated redirect checker for mozilla.com. Worth looking to see if it could help with this bug. https://wiki.mozilla.org/WeeklyUpdates/2009-11-02#QA
Priority: -- → P3
Did anything come of the "Wrote Mozilla.com automation tool to check redirects to landing pages for all the supported locales." on the weeklyupdates (i.e. can this bug be closed?). I was thinking of whipping a quick Python script together to address this, is there a list of url redirects somewhere?
I haven't heard any news about the automation tool, so moving forward a different way makes sense. In terms of where the redirects live, there's one main .htaccess file and then a handful of others in different directories. The main one is at http://viewvc.svn.mozilla.org/vc/projects/mozilla.org/trunk/.htaccess?view=log
OS: Mac OS X → All
Hardware: x86 → All
I've been using lwp-request to check redirects, it's a pretty handy little command that produces output like: [root@sancus ~]# lwp-request -m GET -edsS http://mozilla.org/thunderbird/ GET http://mozilla.org/thunderbird/ --> 301 Moved Permanently GET http://www.mozilla.org/thunderbird/ --> 302 Found GET http://www.mozilla.org/en-US/thunderbird/ --> 200 OK It's part of libwww-perl.
Depends on: 676002
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
(In reply to Kohei Yoshino [:kohei] from comment #8) > Redirect tests have been in mcom-tests: > https://github.com/mozilla/mcom-tests/blob/master/tests/test_redirect.py Thanks (again!)
You need to log in before you can comment on or make changes to this bug.