Closed
Bug 247575
Opened 21 years ago
Closed 19 years ago
Set-up Internal Redirects for better URI naming
Categories
(addons.mozilla.org Graveyard :: Public Pages, enhancement)
addons.mozilla.org Graveyard
Public Pages
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wolf, Unassigned)
References
Details
Reporter | ||
Updated•21 years ago
|
QA Contact: mozilla.update → fantasai.bugs
The point is to hide the CGI interface from the user -- basically, to pretend
that the site uses a normal, hierarchical URI scheme.
Reporter | ||
Updated•21 years ago
|
Severity: normal → enhancement
OS: Windows XP → All
Hardware: PC → All
Reporter | ||
Updated•21 years ago
|
Assignee: psychoticwolf → nobody
QA Contact: fantasai.bugs → mozilla.update
Comment 3•21 years ago
|
||
This sounds interesting. Is such an URI scheme already created for umo?
Reporter | ||
Comment 4•21 years ago
|
||
Bulk Moving Web Site bugs to new component.
(Filter: massumowebsitespam)
Component: Update → Web Site
Product: mozilla.org → Update
Version: other → unspecified
Summary: Set-up Internal Redirects → Set-up Internal Redirects for better URI naming
Comment 5•21 years ago
|
||
I discussed this with Alan a bit on IRC. We came up with the following:
/{lang}/{type}/{app}/{category}/{pagenumber}?os={os}
For a specific file:
/{lang}/{type}/{id}
An example:
/en-us/extensions/firefox/navigation/2?os=windows
The 'os' parameter is optional and allows you to filter the page for a specific
OS. The URI scheme should work like an actual file system. If you remove a "dir"
you should get something useful on your screen.
The {lang} part at the beginning of the URI is to make UMO l10n compatible.
Of course, additional pages as:
/en-us/extensions/firefox/newest
... should be kept as well. Coming up with URIs for such pages is trivial
although it might not hurt to discuss them in a bug.
What about appversion? I guess I would default to the latest, and have any
other version be selected by parameter (eg. ?appversion=1.0)
Now I just need someone who understands mod-rewrite enough to code this
Comment 7•20 years ago
|
||
basically
RewriteEngine On
RewriteBase /
# only do this if it's not a real file/directory
# this may not be what you want
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]
# just a lang
RewriteRule ^([a-z]{2}-[a-z]{2})/?$ index.php?lang=$1 [QSA,L]
# lang and app
RewriteRule ^([a-z]{2}-[a-z]{2})/(Firefox|Thunderbird|Mozilla)/?$
index.php?lang=$1&app=$2 [QSA,L]
# lang, app and type
RewriteRule ^([a-z]{2}-[a-z]{2})/(Firefox|Thunderbird|Mozilla)/(E|T|P)/?$
search.php?lang=$1&app=$2&type=$3 [QSA,L]
# catch all, back to the homepage, external redirect to correct url
RewriteRule ^(.*)$ index.php [R,L]
I stopped there because:
in v2 atm, app names are capitalised and the php is case sensitive to this.
types are either 'E' (extension), 'T' (theme) or 'P' (you guess).
categories are provided as numbers to the query string.
none of these are big issues, but i wanted to make sure guys on v2 were aware of
the bug, the fix is available but to make it slick it needs a little more
consistency with the query parameters.
i'd argue that the {application} should be before the {addon-type}.
we'd need a bit more thought about the edge cases for this but in principle it's
easy.
Comment 8•20 years ago
|
||
php.net use this script to give clean urls on their site
http://cvs.php.net/co.php/phpweb/error.php . The script is the 404 page for the
site. The edge cases that cannot be handled by mod_rewite can be handled by
something similar.
Comment 9•19 years ago
|
||
We have pretty-enough URIs for the majority of user-facing cases, FIXED.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•