Closed Bug 510002 Opened 10 years ago Closed 10 years ago

Rewrite missing.pl into php or rewrite rules.

Categories

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

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: aravind, Assigned: oremj)

References

()

Details

Attachments

(2 files, 1 obsolete file)

The current way of handling 404 on the mozilla.org website is causing undue load on the static web cluster.  These 404s (missing.pl) is now disabled and will need to be re-written as a php script or using rewrites (rules or maps).  The site is now up but broken for these 404s.
Having the automatic redirects for the archive site is a high priority for www.mozilla.org.  Is there anyone in IT who can take a look at this?

BTW, is this a dupe of bug 495899?
Priority: -- → P1
No this isn't a dupe.  IT doesn't normally write/develop web site content, etc.  But, its mrz's call.  I have copied him on this bug.
If no one else is available I can work on this, but I'll need someone to check it in to CVS when I am done.
Adding Steven Garrity to bug to make sure we coordinate with them since they're doing work on the relaunch right now.
Attached file New 404 template
Assignee: nobody → oremj
Status: NEW → ASSIGNED
Attached file New missing script. (obsolete) —
Attachment #394080 - Attachment mime type: text/x-wiki → text/plain
Checking in 404.html.php;
/www/mozilla-org/html/404.html.php,v  <--  404.html.php
initial revision: 1.1
done
RCS file: /www/mozilla-org/html/missing.php,v
done
Checking in missing.php;
/www/mozilla-org/html/missing.php,v  <--  missing.php
initial revision: 1.1
done
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Verifying.

If you go to

http://www.mozilla.org/why-mozilla-matters.html

you automatically get sent to

http://www-archive.mozilla.org/why-mozilla-matters.html

Thanks for turning this around so quickly.
Status: RESOLVED → VERIFIED
OK, the size of this hash table is what's killing things... we have a 1.4 MB
lookup table, which is slow to process no matter what language you're running
it in.

This is just a list of things that got moved to the archive site, right?  Would
it be too huge of a problem to just stat the filesystem to see if the file
exists under archive.mozilla.org?  Both domains are hosted on the same
filesystem.
Not sure if there's a similar construct in php (since we already had that loaded anyway for mozilla.com, and loading both php and mod_perl uses too much RAM), but in perl you'd do something like 

if (-e "../archive.mozilla.org$path_info") { }
Attached file Reduced missing.php
Attachment #394081 - Attachment is obsolete: true
Checking in missing.php;
/www/mozilla-org/html/missing.php,v  <--  missing.php
new revision: 1.2; previous revision: 1.1
done
Verifying that the new version works.  It even fixes an issue with the previous version.  Some URLs weren't redirecting because of the use of certain file types.  For instance the following URL wasn't redirecting because of the use of a .shtml file type.

http://www.mozilla.org/projects/help-viewer/

It redirects fine now.
Blocks: 512160
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
You need to log in before you can comment on or make changes to this bug.