Closed Bug 731101 Opened 13 years ago Closed 13 years ago

Move image fallback logic out of htaccess

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clouserw, Assigned: clouserw)

References

Details

Right now if an image doesn't exist on disk we show a fallback image. There's no reason for this to live in apache. If a $object doesn't have an image, send the fallback image URL. If someone manually goes to a bad image, they'll get a 404, as expected. Please avoid bug 731089 and bug 731097 when you're doing this or they'll be conflicts. Rewrites: > ## fall userpics on anon > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^img/uploads/userpics/.* /img/anon_user.png [L] > > ## fall addon icons on default > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^img/uploads/addon_icons/.* /img/default_icon.png [L] > > ## fall collection icons on collection.png > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^img/uploads/collection_icons/.* /img/collection.png [L]
(In reply to Wil Clouser [:clouserw] from comment #0) > Right now if an image doesn't exist on disk we show a fallback image. > There's no reason for this to live in apache. If a $object doesn't have an > image, send the fallback image URL. If someone manually goes to a bad > image, they'll get a 404, as expected. Please avoid bug 731089 and bug > 731097 when you're doing this or they'll be conflicts. Rewrites: > > > ## fall userpics on anon > > RewriteCond %{REQUEST_FILENAME} !-f > > RewriteRule ^img/uploads/userpics/.* /img/anon_user.png [L] apps/users/models.py line 189 > > ## fall addon icons on default > > RewriteCond %{REQUEST_FILENAME} !-f > > RewriteRule ^img/uploads/addon_icons/.* /img/default_icon.png [L] This is settings.ADDON_ICONS_DEFAULT_URL. We're good there. > > ## fall collection icons on collection.png > > RewriteCond %{REQUEST_FILENAME} !-f > > RewriteRule ^img/uploads/collection_icons/.* /img/collection.png [L] apps/bandwagon/models.py line 264 We're good here.
Assignee: nobody → clouserw
Target Milestone: --- → 6.4.5
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.