Closed Bug 670775 Opened 13 years ago Closed 13 years ago

[One Mozilla] Use Apache and PHP magic to merge mozilla.org into mozilla.com

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jlong, Unassigned)

References

Details

(Whiteboard: [oneMozilla])

Attachments

(2 files, 3 obsolete files)

We are merging mozilla.com and mozilla.org into the one domain mozilla.org. We will Zeus as the URL dispatcher: by default, serve the current mozilla.com codebase. However, if a top-level URL matches one of the current mozilla.org's, serve it from the old mozilla.org codebase. This will require a site script which checks the first part of the URL, compares it to all of mozilla.org's current top-level folders, and if matches redirect the request to be served from the old mozilla.org codebase. Otherwise, serve the current mozilla.com codebase. I'm not too familiar with Zeus so I'm sure there's other things to figure out, but Jeremy said this should work.
No longer depends on: 670124
Depends on: 670115
Whiteboard: [oneMozilla]
Renaming as we are not using Zeus anymore, but rather Apache and PHP magic to serve mozilla.org as mozilla.com top-level URLs. More details and patches to come soon.
Summary: [One Mozilla] Use site script to implement mozilla.com/org merge redirects in Zeus → [One Mozilla] Use Apache and PHP magic to merge mozilla.org into mozilla.com
This patch implements magic to run mozilla.org from the /org subfolder under mozilla.com. All mozilla.org URLs will now work under the same domain as mozilla.com, and all htaccess rewrites will still work too. The patch does this in two steps: * mozilla.org URLs are rewritten to a special PHP handler which loads up the .org codebase and the requested page * mozilla.org htaccess redirects were transformed into an Apache RewriteMap database file and included in mozilla.com There were a few more tweaks here and there, mainly previous kludges that weren't good ways of doing things. So I removed those and fixed a few bugs that I found: * Currently the language switcher in the footer of mozilla.org/en-US/thunderbird/ does not work. This works in my new merged codebase. * mozilla.org's htaccess is HUGE and compacting it into a RewriteMap database file shaved about around 50ms on avg * A few more places I cleaned up that I can't remember This solution was benchmarked here, and proves it works well: https://wiki.mozilla.org/Mozilla.com/2011-Rebranding-Project/Benchmarks
Attachment #547771 - Flags: review?(fwenzel)
removed a few unnecessary tweaks to my patch
Attachment #547771 - Attachment is obsolete: true
Attachment #547773 - Flags: review?(fwenzel)
Attachment #547771 - Flags: review?(fwenzel)
Comment on attachment 547773 [details] [diff] [review] patch to mozilla.com to run mozorg as /org folder This is not code :)
Attachment #547773 - Flags: review?(fwenzel) → review-
Glad to hear that the RewriteMap helps deal with the large htaccess file. What does this mean for any ongoing changes to the htaccess file as more content is archived and if we start cleaning old redirects up? James, do we just notify you of any htaccess changes or will those get picked up automatically?
Uploaded bad file before. New one is the good patch.
Attachment #547777 - Flags: review?(fwenzel)
Attached file making the other attachment obsolete (obsolete) (deleted) —
Attached file making the other attachment obsolete (deleted) —
Attachment #547773 - Attachment is obsolete: true
Attachment #547778 - Attachment is obsolete: true
(In reply to comment #5) > Glad to hear that the RewriteMap helps deal with the large htaccess file. > > What does this mean for any ongoing changes to the htaccess file as more > content is archived and if we start cleaning old redirects up? James, do we > just notify you of any htaccess changes or will those get picked up > automatically? David, don't worry about that, we can just regenerate all the redirects once we're ready to go live. It's pretty easy to do. We'll need to "freeze" those kinds of changes when we're pushing it live (just for a day or two, probably, and just any changes to the htaccess file).
Blocks: 673879
No longer blocks: 673879
Depends on: 673879
Depends on: 673916
Depends on: 675172
Depends on: 675173
Depends on: 675181
Depends on: 675202
Attachment #547777 - Flags: review?(fwenzel) → review-
No longer depends on: 673879
Once we get this QA'ed we'll close this bugger.
Assignee: nobody → mozbugs.retornam
Keywords: qawanted
Raymond, bug 675181 is the last bug that needs QA here.
Closing, as the last few bugs are blocking bug 610724 and we have successfully setup a working site at http://www-dev.allizom.org/
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Keywords: qawanted
Component: www.mozilla.org/firefox → www.mozilla.org
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Assignee: mozbugs.retornam → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: