httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Natalia Portillo" <iosgl...@teleline.es>
Subject RE: [users@httpd] Apache and WAP/WML
Date Tue, 08 Apr 2003 13:54:45 GMT
Hi!

After 3 hours touching apache, I did that:
(For testing used Opera, Nokia simulator, and Alcatel Phone)

I searched I while ago in internet and read that this must be put in
httpd.conf:

RewriteEngine On
# Catch most WAP browsers
RewriteCond %{HTTP_ACCEPT} text/vnd\.wap\.wml [OR]
# WinWAP, WAPjag
RewriteCond %{HTTP_USER_AGENT} wap [OR]
#Nokia emulators (sdk)
RewriteCond %{HTTP_USER_AGENT} 7110
# Rewrite to where your wireless page is located
RewriteRule ^[\./](.*)$ "C:/Program
files/EasyPHP/www/wireless/index.wml" [L]

With this:

AddType application/x-httpd-php .phtml .pwml .php3 .php4 .php .php2 .inc
.wml
AddType image/vnd.wap.wbmp .wbmp

With this, error as follow with simulator and phone (Opera always
works):
Access.log:
194.224.26.189 - - [08/Apr/2003:01:15:09 +0100] "GET /wireless/
HTTP/1.1" 403 322 "-" "Alcatel-BF3/1.0 UP.Browser/4.1.23a
UP.Link/5.1.1.5"
192.168.0.1 - - [08/Apr/2003:01:19:17 +0100] "GET /wireless HTTP/1.1"
403 321 "-" "Nokia Mobile Browser 3.01"

Error.log:
[Tue Apr 08 01:15:25 2003] [error] [client 194.224.26.189] Filename is
not valid: c:/program files/easyphp/wwwc:
[Tue Apr 08 01:19:17 2003] [error] [client 192.168.0.1] Filename is not
valid: c:/program files/easyphp/wwwc:

Then I commented all above (in the php line only removed .wml) and put
that on the httpd.conf:
AddType text/vnd.wap.wml wml
AddType image/vnd.wap.wbmp wbmp
AddType text/vnd.wap.wmlscript wmls
AddType application/vnd.wap.wmlc wmlc
AddType application/vnd.wap.wmlscriptc wmlsc

Worked but no PHP.

Then commented above:
# For PHP 4.x, use this:
 AddType application/x-httpd-php .wml
# This parses php scripts within a .wml page
# For PHP 3.x, use this:
 AddType application/x-httpd-php3 .wml
# For normal WML pages.
 AddType text/vnd.wap.wml .wml
# For WML embedded graphics.
AddType image/vnd.wap.wbmp .wbmp
# End MIME Types for WAP

Then error 500: Gateway unable to encode the file, even in Opera.

So,
Added .wml to the large PHP, commented all of the last except the .wbmp
line, and then fully works including PHP.

But, this:

RewriteEngine On
# Catch most WAP browsers
RewriteCond %{HTTP_ACCEPT} text/vnd\.wap\.wml [OR]
# WinWAP, WAPjag
RewriteCond %{HTTP_USER_AGENT} wap [OR]
#Nokia emulators (sdk)
RewriteCond %{HTTP_USER_AGENT} 7110
# Rewrite to where your wireless page is located
RewriteRule ^[\./](.*)$ "C:/Program
files/EasyPHP/www/wireless/index.wml" [L]

Is supposed to redirect mobile phones (non-HTML ones) to the WAP page
and I think the error is that the path must be relative, and not
absolute. So I'm just trying with relative path:

RewriteRule ^[\./](.*)$ "/wireless/index.wml" [L]

Then browsing http://127.0.0.1/ and transparently redirected to
http://127.0.0.1/index.wml

I want to thank you Danone for the yoghourts I used correcting this
error, lol.

Regards :D


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message