Categories
Uncategorized

Enabling WML on Apache by htaccess or config

If you’re uploading a WML file to a web server to test its validity, etc., there’s a few ways to test. The WMLBrowser for Mozilla based browsers does the job, for testing on a PC/Mac. If you wish to use the server live to see that WML file and how it treats the whole ‘card’ thing for sure, you can do one of two things:

You can alter your apache httpd config file (/etc/httpd/httpd.conf)
# MIME Types for WAP
AddType text/vnd.wap.wml .wml
AddType image/vnd.wap.wbmp .wbmp
AddType application/vnd.wap.wmlc .wmlc
AddType text/vnd.wap.wmlscript .wmls
AddType application/vnd.wap.wmlscriptc .wmlsc
AddType application/vnd.wap.xhtml+xml .xhtml

Alternatively create or edit the .htaccess file in the directory to include this:
DirectoryIndex index.wml
addtype text/vnd.wap.wml wml
addtype application/vnd.wap.wmlc wmlc
addtype text/vnd.wap.wmlscript wmls
addtype application/vnd.wap.wmlscriptc wmlsc
addtype image/vnd.wap.wbmp wbmp
AddType application/vnd.wap.xhtml+xml .xhtml

Note in both cases the entire list is *not* required, you can see some are for Scripting/Indexing and so on, but you can test it out.
Bits and pieces resourced from here