Closed Bug 306967 Opened 19 years ago Closed 12 years ago

replace client-side (meta-tag, javascript) by server-side (.htaccess or httpd.conf) redirects

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: steffen.wilberg, Assigned: GPHemsley)

References

Details

Attachments

(2 files, 2 obsolete files)

We should replace meta-tag and javascript redirects by server-side redirects in .htaccess or httpd.conf. And I don't like 2 client-side redirects in a row either: http://www.mozilla.org/products/firefox/releases/whatsnew/ is the first time start page. It redirects to http://www.mozilla.org/projects/deerpark/: http://doctor.mozilla.org/?file=mozilla-org/html/products/firefox/releases/whatsnew/ That page redirects to http://www.mozilla.org/projects/deerpark/alpha2.html, if you're using a Firefox build newer than 2005-05-15: http://doctor.mozilla.org/?file=mozilla-org/html/projects/deerpark/
Assignee: www-mozilla-org → nobody
QA Contact: danielwang → www-mozilla-org
Product: mozilla.org → Websites
It looks like this now redirects to a different URL located on mozilla.com http://www.mozilla.org/products/firefox/releases/whatsnew/ redirects to: http://www.mozilla.com/en-US/firefox/central/ This redirect takes place due to an entry in /products/firefox/.htaccess
Is there a way to get a list of all pages using client-side redirects? I made an attempt, but my grep-ing skills were not up to the task.
Can someone post an example of what I'm looking for? I can put together a list and post it. Would it be something like <meta refresh...? How about on the javascript side of things?
There may be other ways to do this, but here are two ways I've seen used on pages on the site: From an older version of www.mozilla.org/party/index.html <META HTTP-EQUIV="REFRESH" CONTENT="5; URL=http://www.mozilla.org/party/2008/"> From the current version of www.mozilla.org/start (note that this is a legitimate use since we need to browser sniff) <script type="text/javascript"> <!-- const ua = navigator.userAgent; // Uncomment one of those user agents to test this script // var ua="Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.8b2) Gecko/20050324 SeaMonkey/1.0a" // var ua="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc3) Gecko/20020523" if (ua.match(/SeaMonkey\//)) { // SeaMonkey users might have imported this default start page from an old suite profile // redirect those to the SeaMonkey start page instead location.href = "http://www.mozilla.org/projects/seamonkey/start/"; } if (ua.match(/Firefox\//)) { // Firefox users might have imported this default start page from an old suite profile // redirect those to the Firefox start page instead location.href = "http://www.mozilla.com/firefox/"; } // --> </script> We've been archiving a lot of pages so there may be no more pages left that do client-side redirects, but it would be good to confirm.
I went through and cataloged the redirects in an xls. I also put a column that indicated whether it should be moved to "htaccess", "don't change", or if the page displayed a "moved redirect", "notfound redirect", or "expired redirect" message. I wasn't sure if we want to put all those in htaccess since it seems the page pauses a bit to let the user know that the page moved, wasn't found or expired.
Franklin, thanks for posting this. Having this spreadsheet will be helpful. There are a bunch more redirects than I was expecting, so it will take some time for me to sort through things.
Attached file Sorted TSV of the data in Excel file (obsolete) —
I've taken the Excel file and turned it into a tab-separated file. I've cleaned up the data so that it's easier to deal with, as well. Just looking at the code shown in each line (which appears to have been generated from a search for meta redirects), it is unclear to me what the different options in the "Suggested Action" column mean. For example, in projects/firefox/3.0a3/firstrun/index.html, there is what appears to be a line that merely talks about (in plaintext) a meta redirect that is listed as "moved redirect", alongside lines with genuine HTML code. I'm also not sure what the difference is between "htaccess" and "* redirect". Wouldn't they all be going into .htaccess with the appropriate redirect codes?
Attachment #381205 - Attachment is obsolete: true
(In reply to comment #7) > I'm also not sure what the difference is between "htaccess" and "* redirect". > Wouldn't they all be going into .htaccess with the appropriate redirect codes? Oh, I guess this was explained in comment 5.
I just reorganized the .htaccess file in r82937 to allow for better navigation. This should ease the addition of the redirects requested in this bug.
This file is more useful, as it is sorted by suggested action before it is sorted by file path, which makes it much easier to group similar actions together.
Attachment #513665 - Attachment is obsolete: true
Thanks for cleaning up the Excel file. I imagine that many pages in the list can be archived instead of converting the client-side redirects to a server-side redirect. Gordon, if you'd like to take a pass at seeing what's worth worrying about, that would be great. For the reorganized .htaccess file, that looks really valuable since the current one is a mess. Two comments on that: * That seems to be a separate issue, so maybe we can discuss that in a new bug? * There are way too many redirects in there to test everything by hand. I'd feel a lot better about making big changes to that main .htaccess file if we had some way to test it (which is discussed in bug 495824).
(In reply to comment #11) > Thanks for cleaning up the Excel file. I imagine that many pages in the list > can be archived instead of converting the client-side redirects to a > server-side redirect. Gordon, if you'd like to take a pass at seeing what's > worth worrying about, that would be great. I'll get on that soon. > For the reorganized .htaccess file, that looks really valuable since the > current one is a mess. Two comments on that: > > * That seems to be a separate issue, so maybe we can discuss that in a new bug? Fair enough. Bug 636032. > * There are way too many redirects in there to test everything by hand. I'd > feel a lot better about making big changes to that main .htaccess file if we > had some way to test it (which is discussed in bug 495824). Bug 636032 comment 1.
Assignee: nobody → gphemsley
Depends on: 636032
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Resolving since I believe these pages have been ported to bedrock and all necessary redirects are in place.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: