Adding *.nwc files to your web site
You can add links to .nwc files from your web site in much the same way that you would add links to other binary file types, such as .mid (MIDI) and *.pdf (Adobe PDF) files. When you add NWC files to your web site, there are two vital tasks that have to be performed:
-
You should upload your NWC files as binary files (do not subject them to ASCII handling, which will corrupt them)
-
Configure your web server so that it properly delivers NWC files as binary files of type application/x-nwc
These two tasks are explained in further detail below. It is important to note that if either of these tasks are done improperly, your NWC files may not work as expected on your web site. Sometimes, the results are unpredictable in these cases. For example, the files may work with some browser versions, and not others. The files may work with Internet Explorer, but not Mozilla or Navigator. This confusion can be avoided if both of these tasks are correctly implemented.
When Uploading
If you design your web site on a local computer and then upload it to your web server using FTP or a built-in HTML editor transfer tool, then this step applies to you. Make sure that your transfer program (whether it be an FTP program or your HTML editor) is properly treating your *.nwc files as binary files. Check in the program's documentation to verify the correct behavior.
*Setting Your Web Server's MIME Type for .nwc Files**
Before your uploaded NWC files will work correctly, the web server software that delivers your web content to your viewer's web browser must be configured to properly deliver NWC files in the correct format (MIME type). NWC files (*.nwc) should be delivered with the Content Type/MIME Type set to application/x-nwc in the web server configuration. You can use our Web Site NWC File Header Tool to see the headers that are returned by your web site for your NWC files, and verify the Content-Type from the results.
The exact procedure for configuring mime types depends both on the type of web server software that your web site is using, and what administrative options are at your disposal. If your web site is served by a free hosting company or it is available to you as a package deal with your ISP, then you may not be able to configure the necessary MIME type for NWC files yourself. Contact your hosting company and explain the situation. You can direct them to this FAQ if they have any questions.
Here are some specific instructions:
-
Apache Web Server:
If your web site is served by the Apache Web Server, then the most likely place for you to set the NWC MIME type is in your .htaccess file. You can simply add the following line to the top of your .htaccess file:AddType application/x-nwc nwc
If your web site does not have an .htaccess file, then we recommend that you add this file to the home directory of your web site's pages. The MIME type settings will then apply to all of the directories contained within your web site's home directory.
The .htaccess file will only work if the web administrator has granted htaccess privileges to your web site. The administrator could also add the same line in the main httpd.conf file so that the MIME type is set correctly for all web sites served on the system.
-
Other Web Servers:
There are many other web server programs out there that might be serving your site. If you are hosted on one of those, consult with your web server administrator about setting the correct MIME type for your NWC files. If you are hosted on a Microsoft IIS server, see the further reading links listed below.
Here are some links for further reading on the subject: