Closed Bug 349935 Opened 20 years ago Closed 20 years ago

Add rewriterule to add-ons.mozilla.org|com redirect vhost for search-engines.php

Categories

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

All
Other
task
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: morgamic, Assigned: oremj)

References

()

Details

Need to add a rewrite rule to allow ^/search-engines/ to work, since it is coming in as a URI from 2.0 clients. This occurs after the add-ons.mozilla.com|org top-level redirects, which end up pointing to: https://addons.mozilla.org/search-engines/ That URI -> 404, which is what caused bug 349903.
Blocks: 349903
OS: Other → All
Note -- keep in mind that the order of the rewriterule in the vhost conf is important. Thanks!
OS: All → Other
Also, the RewriteRule is in CVS -- see htaccess.dist: http://lxr.mozilla.org/mozilla/source/webtools/addons/public/htaccess.dist The diff/patch to the set of rewriterules is in bug 349903 attachment 235118 [details] [diff] [review]: # Send search-engine requests to search-engines.php. RewriteRule ^search-engines[/]{0,1}$ search-engines.php [L]
Assignee: server-ops → oremj
Alright, so I messed up. The URIs coming from the clients are pointing to /search-engines/ but they should really point to /search-engines.php, and we don't want to add another entry point to worry about when we migrate to the new AMO in a couple months. So -- arguably this could/should be handled in the add-ons vhost, and group it with the other redirects to make it more manageable when we are going to look at changing things around in October.
Check the URI -- that is what should end up at search-engines.php instead of search-engines/: https://en-US.add-ons.mozilla.com/en-US/firefox/2.0b2/search-engines/
Summary: Add rewriterule for addons.mozilla.org → Add rewriterule add-ons vhost for search-engines.php
Summary: Add rewriterule add-ons vhost for search-engines.php → Add rewriterule to add-ons vhost for search-engines.php
Whiteboard: morgamic--
If the rewrite should/needs to be handled when people go straight to "addons.mozilla.org" then it needs to be in the main vhost (not the redirect vhost). If it is only processed for the other add-ons.*.m.o|c and *not* addons.m.o, then redirect is the correct place.
(In reply to comment #5) > If the rewrite should/needs to be handled when people go straight to > "addons.mozilla.org" then it needs to be in the main vhost (not the redirect > vhost). If it is only processed for the other add-ons.*.m.o|c and *not* > addons.m.o, then redirect is the correct place. The rewrite doesn't need to be handled when people go straight to a.m.o. The URL in question is only coming from the redirects out of the $LOCALE.a-o.m.o|c service, and we should just fix that there, especially since those URLs are going to change targets in a handful of weeks anyway. WONTFIX, I declare!
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
We need to add an additional rule to the redirect vhost (the add-ons vhost -- WITH A HYPHEN -- add-ons.mozilla.org|com -- the one Firefox 2.0 points to): RewriteRule ^/(\w{2,3}(-\w{2}(-mac)?)?)/(.+?)/(.+?)/search-engines/?$ https://addons.mozilla.org/search-engines.php [R] I had tried to rewrite the summary to reflect that, I guess this is all just confusing w/ add-ons looking like addons, etc. I've updated the summary to be even more specific. So -- Shaver -- is that RewriteRule, placed in the add-ons.mozilla.org|com redirect vhost, acceptable? It would go before the other rewrite rules: RewriteRule ^/(\w{2,3}(-\w{2}(-mac)?)?)/?$ https://addons.mozilla.org/ [R] RewriteRule ^/(\w{2,3}(-\w{2}(-mac)?)?)/(.+?)/(.+?)/(.*)$ https://addons.mozilla.org/$6 [R] RewriteRule ^/(\w{2,3}(-\w{2}(-mac)?)?)/(.*)$ https://addons.mozilla.org/$4 [R] Redirect temp / https://addons.mozilla.org/
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Summary: Add rewriterule to add-ons vhost for search-engines.php → Add rewriterule to add-ons.mozilla.org|com redirect vhost for search-engines.php
Whiteboard: morgamic--
Yeah, if I'm running that regex correctly in my head, that's fine. If not, Firefox 2 is only in beta anyway. :) Thanks.
Updated. Index: virtual-redirect.mozilla.org.confect.mozilla.org.conf =================================================================== --- virtual-redirect.mozilla.org.conf (revision 124) +++ virtual-redirect.mozilla.org.conf (working copy) @@ -123,6 +123,7 @@ ServerName addons.mozilla.com ServerAlias *.add-ons.mozilla.com *.add-ons.mozilla.org RewriteEngine On + RewriteRule ^/(\w{2,3}(-\w{2}(-mac)?)?)/(.+?)/(.+?)/search-engines/?$ https://addons.mozilla.org/search-engines.php [R,L] RewriteRule ^/(\w{2,3}(-\w{2}(-mac)?)?)/?$ https://addons.mozilla.org/ [R] RewriteRule ^/(\w{2,3}(-\w{2}(-mac)?)?)/(.+?)/(.+?)/(.*)$ https://addons.mozilla.org/$6 [R] RewriteRule ^/(\w{2,3}(-\w{2}(-mac)?)?)/(.*)$ https://addons.mozilla.org/$4 [R]
Status: REOPENED → RESOLVED
Closed: 20 years ago20 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.