Closed Bug 489910 Opened 16 years ago Closed 16 years ago

Update .htaccess rules to handle firefox-f1 and firefox-osxkey

Categories

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

defect
Not set
blocker

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: djst, Assigned: paulc)

References

Details

(Whiteboard: sumo_only)

Attachments

(1 file, 5 obsolete files)

In Firefox 3.5 RC, we would like to identify (in Omniture) how people end up on Firefox Support based on the three possible paths: * Selecting from the Help menu * Pressing F1 on the keyboard * (Mac) Pressing Cmd+Shift+? on the keyboard There is already a patch in bug 489245 that allows us to identify what path people took to reach help, but we need to set up appropriate .htaccess rules to identify these paths and point them to unique places. For now, though, all we need to do is to make sure that we point all three paths to the inproduct start page. So, we need to add the following two .htaccess rules: RewriteRule ^1/([\-a-zA-Z]+)/([\.0-9ab]+(?:pre)?)/([\-_a-zA-Z0-9]+)/([\-a-zA-Z]+)/firefox-help-f1\/$ /$4/kb/Firefox+Help?style_mode=inproduct [R,NE] RewriteRule ^1/([\-a-zA-Z]+)/([\.0-9ab]+(?:pre)?)/([\-_a-zA-Z0-9]+)/([\-a-zA-Z]+)/firefox-help-osxkey\/$ /$4/kb/Firefox+Help?style_mode=inproduct [R,NE] In time for RC, we will want to make sure that these three sources are pointed to unique pages, but that's a separate bug. Laura, if we could get this into 1.1, that would be awesome as it blocks bug 489245. Thanks!
Assignee: nobody → laura
Attached patch patch for htaccess.dist (obsolete) — Splinter Review
After svn up, you'll need to run (in webroot) sudo ./htaccess.sh to regenerate your .htaccess files.
Attachment #377504 - Flags: review?(smirkingsisyphus)
Comment on attachment 377504 [details] [diff] [review] patch for htaccess.dist Or review from paulc would be fine, whichever of you has time.
Attachment #377504 - Flags: review?(paul.craciunoiu)
Comment on attachment 377504 [details] [diff] [review] patch for htaccess.dist Pressing F1 after setting all this up redirects to /en-US/kb/Firefox+Help?style_mode=inproduct So it seems to be doing the right thing.
Attachment #377504 - Flags: review?(paul.craciunoiu) → review+
In r25744/r25745.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Attachment #377504 - Flags: review?(smirkingsisyphus)
Um, I just saw this go by in #sumodev so I don't have the history... that said... your htaccess rewrite is for firefox-help-f1 and your subject line is firefox-f1 (ditto for osxkey). I think the extra -help is wrong based on the linked bug but I could be wrong since I didn't read it too carefully.
Also, bug 489245 hasn't landed a patch yet so you can't test with f1, you need to put the URL in manually. (This patch is definitely inconsistent with bug 489245)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Oops, you are absolutely right. It should be firefox-f1 and firefox-osxkey, NOT firefox-help-f1 and firefox-help-osxkey as I originally wrote! Sorry about the misunderstanding; I guess keeping "-help" felt more natural to me. Paul, if you can submit a new patch I can review it. What's worse is that this bug is blocking bug 489245 which is supposed to go into RC1! We really need to get this fix to prod now, or bug 489245 will have to wait until 3.next. Laura: can we push this one out separately? I don't know how much time we have, but I will comment in bug 489245 about this too.
Severity: normal → blocker
I'm not sure I understand what I need to do.
Attachment #377504 - Flags: review-
Attachment #377504 - Attachment is obsolete: true
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #380064 - Flags: review?(djst)
Attachment #380064 - Flags: review?(djst) → review+
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Thanks for the quick fix Paul!
Whiteboard: needs to be pushed to prod ASAP
Attached patch patch v3Splinter Review
Attachment #380203 - Flags: review?(laura)
Apparently making the slash optional fixes the ending with "f1" issue. I'm not sure why this i, though. I'm not an expert with rewrite rules so having someone take a second look would be best.
Attached patch patch v4 (obsolete) — Splinter Review
Previously, the rewrite ending in "-f1" wouldn't work without having a trailing slash in the initial URL, whereas the one ending in "-osxkey" worked. After a long IRC discussion with Laura, David, and Mike Shaver, we looked at the apache logs and it seems that the rule '^1/([\-a-zA-Z]+)/([\.0-9ab]+(?:pre)?)/([\-_a-zA-Z0-9]+)/([\-a-zA-Z]+)/([\-_a-zA-Z]+)$' gets applied to the "-osxkey" version, making both trailing and non-trailing slash work. This is not true for "-f1" since it contains digits. To keep consistent existing behavior and rewrites, we've decided *not to* add digits to that rule (might cause serious regressions). Instead, this patch will remove the slashes and allow only the non-trailing slash version of the two rules for "-f1" and "-osxkey".
Assignee: laura → paul.craciunoiu
Attachment #380064 - Attachment is obsolete: true
Attachment #380203 - Attachment is obsolete: true
Status: RESOLVED → REOPENED
Attachment #380216 - Flags: review?(laura)
Attachment #380203 - Flags: review?(laura)
Resolution: FIXED → ---
Comment on attachment 380216 [details] [diff] [review] patch v4 Don't need to change the ordering.
Attachment #380216 - Flags: review?(laura) → review-
Attached patch try this one? (obsolete) — Splinter Review
Attachment #380221 - Flags: review?
Attachment #380221 - Flags: review? → review?(paul.craciunoiu)
Attached patch after svn up (obsolete) — Splinter Review
Attachment #380221 - Attachment is obsolete: true
Attachment #380225 - Flags: review?
Attachment #380221 - Flags: review?(paul.craciunoiu)
Attachment #380225 - Flags: review? → review?(paul.craciunoiu)
Attachment #380203 - Attachment is obsolete: false
Attachment #380203 - Flags: review?(laura)
Attachment #380203 - Flags: review?(laura) → review+
Attachment #380225 - Flags: review?(paul.craciunoiu)
r26463 / r26464 Comitted patch 3. Marking others obsolete now.
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Attachment #380064 - Flags: review+ → review-
Attachment #380216 - Attachment is obsolete: true
Attachment #380225 - Attachment is obsolete: true
Looks good to me using: http://support-stage.mozilla.org/1/firefox/3.6a1pre/Darwin/en-US/firefox-osxkey http://support-stage.mozilla.org/1/firefox/3.6a1pre/Darwin/en-US/firefox-f1 (Just a note that in-product scares me, so we'll need to augment our in-product Selenium testcase, or just add a new one to cover these cases.) Verified FIXED
Status: RESOLVED → VERIFIED
Whiteboard: needs to be pushed to prod ASAP → sumo_only
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: