The article Properly configuring server MIME types has been incrementally updated over the last 15 years, but it is probably out of date in significant ways. It needs to be reviewed and updated.
@chrisdavidmills I would like to tackle this one
@caraya you are assigned; thanks for helping out!
@chrisdavidmills
In reviewing the file there are a lot of issues that will require discussion and full re-writes and probably discussion on what needs to go in this article.
For example, the sample .htaccess file (https://wiki.developer.mozilla.org/en/Sample_.htaccess_file) is not really a .htaccess file but a discussion on what can go into one. Should we write a full .htaccess file or just concentrate on mime types?
The page is Apache specific. Should we also address NGINX too?
Do we need to keep the historical note about Firefox loading CSS files even if they had the wrong MIME type? It may lead to confusion
When I last worked on MDN, I did the edits and adds directly on the Wiki, is that still the way to go?
@chrisdavidmills
In reviewing the file there are a lot of issues that will require discussion and full re-writes and probably discussion on what needs to go in this article.
That is fair enough, @caraya . Some of our articles have gone rather out of date.
For example, the sample .htaccess file (https://wiki.developer.mozilla.org/en/Sample_.htaccess_file) is not really a .htaccess file but a discussion on what can go into one. Should we write a full .htaccess file or just concentrate on mime types?
I would provide a full sample .htaccess file, which shows the most important things you should include, and then describe what each bit does, why it is important, etc. The current state of things is a bit misleading.
The page is Apache specific. Should we also address NGINX too?
Probably a good idea, with NGINX being increasing popular.
Do we need to keep the historical note about Firefox loading CSS files even if they had the wrong MIME type? It may lead to confusion
No. Sounds out of date to me.
When I last worked on MDN, I did the edits and adds directly on the Wiki, is that still the way to go?
Yes, that's fine. I am happy to review it there too.
@chrisdavidmills
Ready for review. Still working on .htaccess and nginx equivalency
Thanks @caraya , this looks really good. I've given it a copy edit and tightened up the language a bit.
It would also be nice for @hamishwillee to give this a check over.
@chrisdavidmills @caraya Subedited. I found the English confusing in several parts about whether we were talking about the server or the browser.
In particular I changed the titles of the headings about getting MIME types to make it clear that one is what you set in the server and the other is how you check the MIME type of files your recieved.
There are two significant broken links in https://wiki.developer.mozilla.org/en-US/docs/Learn/Server-side/Configuring_server_MIME_types#How_to_set_up_your_server_to_send_the_correct_MIME_types
If you're using the Apache web server, simply copy this sample .htaccess file to the directory, which contains the files that you want to work with or the parent directory if there are many such directories.
This says you can copy the htaccess file at the link BUT the link is to an obselete MDN doc. The doc is also not something you can copy - its a kind of guide. This needs to be fixed.
Further the NGINX link doesn't exist yet.
FYI though, I renamed snipet > snippets
I think this is a useful doc - great to see @caraya putting some work into it!
FWIW this is about my existing level of knowledge about MIME types already, so I couldn't say if we were missing anything. Once the links above are sorted it will be good.
Thanks @hamishwillee !
The two broken links to the example files are because @caraya is still working on them, I believe.
@hamishwillee thank you for the feedback
The link to the Apache configuration should work, I just tested it but it goes to the archived version of the page that I just finished working on (https://wiki.developer.mozilla.org/en-US/docs/Archive/Sample_.htaccess_file). Perhaps it can be moved out of the archive and renamed in the process.
I will be working over the next week on the Nginx configuration example as it's more complicated than I assumed it would be.
I also don't know if I have permission to create new pages or only to edit existing ones.
Hi @caraya (@chrisdavidmills)
In that case this will need just a little more work:
What you might do instead is copy the relevant section into "Configuring Server MIME types" and then have the example files just as "Related links" at the end.
Chris, This page also needs to be "un archived". How does that work?
Chris, This page also needs to be "un archived". How does that work?
To unarchive, it just needs to be moved out of /Archive/ to somewhere else. Should we put this page under /Server-side/ as well? What do you think we should call it?
@chrisdavidmills Thanks!
To unarchive, it just needs to be moved out of /Archive/ to somewhere else.
FYI, I don't think I have necessary rights to do this.
Should we put this page under /Server-side/ as well?
You mean under https://developer.mozilla.org/en-US/docs/Learn/Server-side ? That seems sensible.
Further down the track we might want to expand on our docs. We could perhaps put this in a grouping parent - e.g. _/Learn/Server-side_/Apache or e.g. _/Learn/Server-side/Servers? Maybe too early?
My concern with this doc is that it feels like an orphan. Nowhere do we introduce Apache, Nginx and other alternatives.
Minimally perhaps we could add a section about popular web servers in https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps/Introduction ?
What do you think we should call it?
My preference is Apache Configuration: .htaccess (to perhaps one day be accompanied by Apache Configuration: httpd.conf). If you prefer something more verbose: Apache Server Configuration using .htaccess files
@hamishwillee, @chrisdavidmills
- This links to the top of the doc, which is a set of examples (not just one file you can copy)
I was waiting to get the final location before changing the link. I like the idea of linking directly to the mime type configuration directly.
OK, article moved:
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Apache_Configuration_htaccess
Thanks folks!