Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache will not serve .wml files

Status
Not open for further replies.

maslett

Technical User
Mar 11, 2004
121
GB
Hi,
I'm trying to get my apache server (Apache/2.0.55 (Ubuntu) PHP/5.1.2) to serve .wml files. When I type in the url the browser (both FF & IE) says it's an unknown file type and asks if I want to download the file.

After a bit of research I came across this advice:
Code:
Add these lines to the mime.types in the conf directory and your Apache will serve WAP type files as well:

text/vnd.wap.wml .wml
application/vnd.wap.wmlc .wmlc
text/vnd.wap.wmlscript .wmls
application/vnd.wap.wmlscriptc .wmlsc
image/vnd.wap.wbmp .wbmp

So I grep'd my mime.types files and all the lines mentioned above were already present:
Code:
root@aslett:/etc# grep vnd.wap mime.types 
application/vnd.wap.sic
application/vnd.wap.slc
application/vnd.wap.wbxml                       wbxml
[b]application/vnd.wap.wmlc                        wmlc[/b]
[b]application/vnd.wap.wmlscriptc                  wmlsc[/b]
[b]image/vnd.wap.wbmp                              wbmp[/b]
text/vnd.wap.si
text/vnd.wap.sl
[b]text/vnd.wap.wml                                wml[/b]
[b]text/vnd.wap.wmlscript                          wmls[/b]

The test.wml file is also definately present on the server in the correct directory:
Code:
root@aslett:/var/[URL unfurl="true"]www/soduku#[/URL] ls
head.inc.htm  html  index.php  solved.php  test.wml

Any help on solving this would be very appreciated.
Thanks.
Matt.
 
I'm by no means an expert, so I'm just bouncing this off you to see if it goes anywhere.

I'm still running apache 1.3, and when I wanted to use .shtml files on my site I had to add the following 2 lines to my site configuration:

AddType text/html .shtml
AddHandler server-parsed .shtml

Now I understand that your .wml stuff is already set up in the mime-types file, so you shouldn't have to add the type on the fly, but maybe you have to tell the server what to do with it using an "add-handler" statement in your site config file?

Like I said... When I needed to make this work I got it out of a book somewhere - I'm by no means an expert!


 
Thanks for the reply donb01,

I added the AddHandler statement to /etc/apache2/apache2.conf (as it was the only file that already contained AddHandler commands), restarted apache but the same problem still exists.

Thanks anyway.
Matt
 
I AM SUCH A DOOOFUS!!

When I used a wap browser emulator everything worked fine.

Apologies to anyone who wasted their time reading the problem.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top