<-- Runs into the forum wearing a black balaclava and carrying a water pistol.
"EVERYONE ON THE FLOOR....THIS THREAD BELONGS TO US NOW. MWUHAHAHAHAHA."
Indeed. Anyway Greg, you've hit the nail right on the head old fruit (only a Brit can say that and get away with it). The server doesn't even have to know about the MIME types when it receives the request, the gateway will simply ask it for uvwxyz.wml and the server looks for it. It's when the server returns it that it must know the correct MIME type to put in the header. IOW a server can send a WML file back even without the MIME types installed, it just won't be recognised at the other end since the server will have defaulted to Content-type: text/html in the header.
There's nothing mystical about WAP, this is pretty much the same way that all server requests work. Someone using (e.g.) IE5 makes a request, the browser passes that request (via nameservers) to the server, the server responds with the correct file using the correct MIME types, the browser interprets it (using applications according to the MIME types e.g. Flash plug-in), and the user sees the end result. With WAP the bulk of the conversing is done by the gateway since it's far quicker than using the phone directly. The gateway also compresses any resulting files which makes transmission back to the phone much quicker.
To answers Ray's question, there are several ways to install the MIME types (assuming an Apache server):
1) As the owner of an Alabanza server, you can do it right from the control panel (so I believe, Alabanza owners are welcome to tell me I'm a moron if this isn't so)
2) If you have root access to the server, you need to find a file named srm.conf (usually in /etc/httpd/conf), find the AddType section and add the following:
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
Save the file and then restart Apache HTTPd.
3) If you do not have root access to the server (e.g. you're a customer on a virtual server and the host won't install the new MIME types for you) then you can still do it on a per directory basis. In each directory that will hold WAP-type documents, you need to create a file named .htaccess (the leading . is intentional). The file should look something like 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
Note that this also specifies index.wml as the directory default. This means that if you created a folder
http://www.mydomain.com/wap/ and added the above .htaccess to it, anyone surfing to
http://www.mydomain.com/wap/ would receive index.wml as the home page. Also note that some servers are configured to ignore .htaccess files for security reasons.
I know that the last suggestion works as I did it for my own WAP news service - works fine.
Best of luck,
Speedie.