Closed Bug 353362 Opened 18 years ago Closed 18 years ago

Remove redirects from www.mozilla.com that are no longer needed

Categories

(mozilla.org Graveyard :: Server Operations, task)

task
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: reed, Assigned: oremj)

References

()

Details

I'm hearing people on IRC complaining about the initial start pages for Firefox 2.0 RC1 being 404. This is due to some old redirects for *.www.mozilla.com/www.mozilla.com that are still active and are no longer needed.

Currently, http://en-US.www.mozilla.com/en-US/firefox/2.0/firstrun/ redirects to http://www.mozilla.com/firefox/firstrun/, which is a 404. This is just one example of the old redirect causing some issues.

Basically, I think we currently do some stripping of the URI to remove locale, version, etc. Even though we're not using Khan yet, pkim/sgarrity added some placeholder pages so people would not get 404 errors.

Since we only have pages for en-US for the RC1 builds, we will need all other locales redirected to en-US if there is not a directory for them. So, could you have it check for /locale/<...> to see if the locale is available, and if it is not, just redirect to the en-US pages?

We might have to add a few redirects for older builds (b1/b2), but I won't know exactly what pages are needed until the current redirects are removed.

Also, please post the redirects currently used in this bug for posterity reasons in case we need them for the future. :)
CC'ing beltzner for approval...
Beltzner approval?
Assignee: server-ops → oremj
Oops, missed Justin's comment.
Whiteboard: Waiting for approval
From what I recall of Justin's redirect scripts, the first thing we do is basically strip out all of the locale information from the incoming URLs with some fancy regex.

So I'm not sure exactly which redirect is messing us up here, and I'm having trouble approving "remove some redirects", but here's what I definitely approve of us doing:

 - until localized content exists, all locales should redirect to en-US pages
 - until actual content exists, we should have placeholders at:

     http://en-US.www.mozilla.com/en-US/firefox/2.0/whatsnew/
     http://en-US.www.mozilla.com/en-US/firefox/2.0/firstrun/
     http://en-US.www.mozilla.com/en-US/firefox/2.0/releasenotes/
Ok, let me attempt to explain this better for beltzner.

Basically, we have some mod_rewrite rules that are rewriting URIs to remove locales, product versions, etc. These were needed at the time, but now are not needed, as we have some temporary pages up that actually match the new URL structure.

These rules are what should be removed.

Also, after removing these rules, another rule needs to be added that redirects URLs to locales that end in a 404 should redirect to the en-US version of the file. Basically, if /fr-FR/firefox/2.0/firstrun/ doesn't exist / gives 404, then the page should be redirected to /en-US/firefox/2.0/firstrun/, etc. I haven't looked into the logistics involved in this rule, so I'm not sure the best way to do it yet.

Again, please post all redirects for www.mozilla.com here, so that I can see if something being removed shouldn't be removed and/or if something that is still active should be removed, etc.
Status: NEW → ASSIGNED
Whiteboard: Waiting for approval
(In reply to comment #5)
> Ok, let me attempt to explain this better for beltzner.

Sometimes I am dense enough that things require a hammer; thanks, reed!

> Basically, we have some mod_rewrite rules that are rewriting URIs to remove
> locales, product versions, etc. These were needed at the time, but now are not
> needed, as we have some temporary pages up that actually match the new URL
> structure.
> 
> These rules are what should be removed.

Agreed, as per previous comment (the strategy should be to create placeholder content instead of redirecting to existing pages).

> URLs to locales that end in a 404 should redirect to the en-US version of the
> file. Basically, if /fr-FR/firefox/2.0/firstrun/ doesn't exist / gives 404,

I think this already exists, but again, agreed as per my previous comment - when no localized content exists, **-** --> en-US :)

> Again, please post all redirects for www.mozilla.com here, so that I can see 

Which ones are you talking about, here? Existing redirects? To-be-done redirects?

Anyway, Jeremy, you definitely have approval to execute the strategy as described here and in comment 4; please find me on IRC (or call my cell) if you need further clarification.
>  - until actual content exists, we should have placeholders at:
> 
>      http://en-US.www.mozilla.com/en-US/firefox/2.0/whatsnew/
>      http://en-US.www.mozilla.com/en-US/firefox/2.0/firstrun/
>      http://en-US.www.mozilla.com/en-US/firefox/2.0/releasenotes/

We have placeholders up on mozilla.com for /whatsnew/ and /firstrun/. We will get a releasenotes page up by end of this week. 

Note that if we want localized release notes, we need to have the text handed to localizers for translation as soon as possible.
How do these look?  Seems to work pretty well.  If the directory or file does not exist it tries to redirect it to en-US.  You can test how this is working at www-stage.mozilla.com.   

 RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/products/firefox/$ http://www-stage.mozilla.com/products/firefox/
    RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/blocklist/$ http://www-stage.mozilla.com/blocklist/
    RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/livebookmarks/$ http://www-stage.mozilla.com/firefox/livebookmarks.html
    RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/community/$ http://www.mozilla.org/contribute/
    RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/customize/$ http://addons.mozilla.org/
    RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/help/$ http://www-stage.mozilla.com/support/
    RewriteCond /data/www/www-stage.mozilla.com/%{REQUEST_FILENAME} !-f
    RewriteCond /data/www/www-stage.mozilla.com/%{REQUEST_FILENAME} !-d
    RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/(.*)$ http://www-stage.mozilla.com/en-US/firefox/$4
Jeremy - 

Here's my quick test results:

>  RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/products/firefox/$
> http://www-stage.mozilla.com/products/firefox/

Above is giving me this error:
The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
*   This problem can sometimes be caused by disabling or refusing to accept cookies.

>     RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/blocklist/$
> http://www-stage.mozilla.com/blocklist/
Above is 404ing

>     RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/livebookmarks/$
> http://www-stage.mozilla.com/firefox/livebookmarks.html
Works for me.

>     RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/community/$
> http://www.mozilla.org/contribute/
WFM.

>     RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/customize/$
> http://addons.mozilla.org/
WFM.

>     RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/help/$
> http://www-stage.mozilla.com/support/
WFM.

>     RewriteCond /data/www/www-stage.mozilla.com/%{REQUEST_FILENAME} !-f
>     RewriteCond /data/www/www-stage.mozilla.com/%{REQUEST_FILENAME} !-d
>     RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/(.*)$
> http://www-stage.mozilla.com/en-US/firefox/$4
Above is giving me this error:
The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
*   This problem can sometimes be caused by disabling or refusing to accept cookies.

*** Bug 353589 has been marked as a duplicate of this bug. ***
If I try to go to "http://www-stage.mozilla.com/en-US/firefox/", I get redirected to "http://www-stage.mozilla.com/en-UF/firefox/index.html" (en-UF? huh?). (In reply to comment #10)

> >     RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/blocklist/$
> > http://www-stage.mozilla.com/blocklist/
> Above is 404ing

We don't have anything there yet, so that should be fine.

> >     RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/community/$
> > http://www.mozilla.org/contribute/
> WFM.
> 
> >     RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/customize/$
> > http://addons.mozilla.org/
> WFM.
> 
> >     RewriteRule (\w{2,3}(-\w{2,3}(-mac)?)?)/firefox/help/$
> > http://www-stage.mozilla.com/support/
> WFM.

pkim: I thought you had Steven put some placeholders up for these pages. Do you still want them redirecting to the various places for now?
Hey Jeremy -

Are you waiting on anything from me or Beltzner with the redirects to fix the 404s for the /firstrun/ and /whatsnew/ pages for RC1?

Paul
Severity: normal → major
whats new (aka Gettting Started on the bookmark tool bar) seems to work in the brief testing I did for several locales.  its redirecting to en-us content at http://www.mozilla.com/firefox central...

I'll make another quick pass to make sure there are no 404 problems there...
Changes pushed live to www.mozilla.com.  Right now anything with locale/firefox/* will check to see if the file is there and if not redirect to the US version.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.