Pocket PC Thoughts - Daily News, Views, Rants and Raves

Check out the hottest Windows Mobile devices at our Expansys store!





Go Back   Thoughts Media Forums > POCKET PC THOUGHTS > Pocket PC Developer

Reply
 
LinkBack (8) Thread Tools Display Modes
  #11 (permalink)  
Old 07-22-2003, 10:44 PM
Ponderer
Join Date: Jul 2003
Posts: 100

Instead of using page based code, I've been using mod_rewrite in the .htaccess file. I may not be exactly correct, but it works well.

Code:
RewriteCond %{HTTP_USER_AGENT} "Windows CE" [NC,OR] #Windows CE and Pocket PC 
RewriteCond %{HTTP_USER_AGENT} "NetFront" [NC,OR] #PalmSource WebBrowser 2.0
RewriteCond %{HTTP_USER_AGENT} "Palm OS" [NC,OR] #Eudora Web Browser for Palm
RewriteCond %{HTTP_USER_AGENT} "Blazer" [NC,OR] #Handspring Blazer Browser
RewriteCond %{HTTP_USER_AGENT} "Elaine" [NC,OR] #RIM Devices
RewriteCond %{HTTP_USER_AGENT} "^WAP.*$" [NC,OR] #WAP Browsers
RewriteCond %{HTTP_USER_AGENT} "Plucker" [NC,OR] #Plucker Offline download client
RewriteCond %{HTTP_USER_AGENT} "AvantGo" [NC] #AvantGo Service 
RewriteRule ^index\.php http://www.yourdomain.com/mobilepage.php [L,R]
__________________
"So Shut Up, Live, Travel, Adventure, Bless, And Don't Be Sorry." - Jack Kerouac
www.seadoc.net
 
Reply With Quote
  #12 (permalink)  
Old 07-22-2003, 10:50 PM
Intellectual
Join Date: Jul 2003
Posts: 184

This is very helpful code. Thanks!!
Now all I need is some content on my site that people would want to read and read on their mobile device.
 
Reply With Quote
  #13 (permalink)  
Old 07-22-2003, 11:10 PM
Pupil
Join Date: Jul 2003
Posts: 43

Quote:
Originally Posted by medic119
Instead of using page based code, I've been using mod_rewrite in the .htaccess file. I may not be exactly correct, but it works well.

Code:
RewriteCond %{HTTP_USER_AGENT} "Windows CE" [NC,OR] #Windows CE and Pocket PC 
RewriteCond %{HTTP_USER_AGENT} "NetFront" [NC,OR] #PalmSource WebBrowser 2.0
RewriteCond %{HTTP_USER_AGENT} "Palm OS" [NC,OR] #Eudora Web Browser for Palm
RewriteCond %{HTTP_USER_AGENT} "Blazer" [NC,OR] #Handspring Blazer Browser
RewriteCond %{HTTP_USER_AGENT} "Elaine" [NC,OR] #RIM Devices
RewriteCond %{HTTP_USER_AGENT} "^WAP.*$" [NC,OR] #WAP Browsers
RewriteCond %{HTTP_USER_AGENT} "Plucker" [NC,OR] #Plucker Offline download client
RewriteCond %{HTTP_USER_AGENT} "AvantGo" [NC] #AvantGo Service 
RewriteRule ^index\.php http://www.yourdomain.com/mobilepage.php [L,R]
do you replace ^index\.php with your main page in the root?

Thanks,
Kevin
 
Reply With Quote
  #14 (permalink)  
Old 07-22-2003, 11:21 PM
Philosopher
Join Date: Jan 2003
Posts: 553

while i do know *some* asp, i believe the first code is for php.

can anyone "translate" that to asp?
__________________
www.untitled.at - my companywww.mores.cc - my private site / moblog
 
Reply With Quote
  #15 (permalink)  
Old 07-23-2003, 12:42 AM
Ponderer
Join Date: Jul 2003
Posts: 100

Quote:
do you replace ^index\.php with your main page in the root?

Thanks,
Kevin
Yes..
Example: if the root page is mypage.html use ^mypage\.html

Be aware though, thats just a code snippet for that section of my .htaccess file.

You need to have the line RewriteEngine on somewhere near the top to turn on mod_rewrite and you have to have mod_rewrite installed on your apache server.
__________________
"So Shut Up, Live, Travel, Adventure, Bless, And Don't Be Sorry." - Jack Kerouac
www.seadoc.net
 
Reply With Quote
  #16 (permalink)  
Old 07-23-2003, 06:21 AM
Neophyte
Join Date: Jan 2003
Posts: 3
Send a message via ICQ to summoner
Default Does this work for WM2003?

I've tried the asp code given here, and the javascript, but apparently they don't work for WM2003... any ideas?

Ariel
 
Reply With Quote
  #17 (permalink)  
Old 07-23-2003, 09:14 AM
Ponderer
Join Date: Mar 2002
Posts: 104
Send a message via MSN to DavidHorn

Thank you very much! This'll be really useful for SmartGamer.org.
__________________
David HornPocketGamer.org - For Gamers on the Go...Pocket PC games news (latest releases), reviews (newest), downloads, discussion, giveaways & special offers, and plenty more besides!
 
Reply With Quote
  #18 (permalink)  
Old 07-25-2003, 03:57 PM
Thinker
Join Date: Feb 2002
Posts: 400

This could be useful - I've just found out that Microsoft's own ASP.NET controls (in particular the asp:LinkButton) which used to work with PIE on PocketPC2002 no longer work when accessing the page from PIE on WM2003! :roll:
__________________
The internet - it's just like CB radio all over again.
 
Reply With Quote
  #19 (permalink)  
Old 08-05-2003, 02:32 PM
Ponderer
Join Date: Jul 2003
Posts: 67

Excellent post!

Now I'm going to have to create a special set of mobile friendly templates for UBB Threads
__________________
Da LAN Tech -network news and reviews
 
Reply With Quote
  #20 (permalink)  
Old 08-05-2003, 02:35 PM
Oracle
Join Date: Aug 2006
Posts: 881

I am getting problems when trying to use the code.... namely nothing is happening, I have debugged it but it seems to not detect anything what am I missing? I am referring to the first set of code (the php not javascript). Thanks!!
 
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://forums.thoughtsmedia.com/f327/mobile-device-re-direct-code-47184.html
Posted By For Type Date
6 ways to create a mobile version of your site Your TwiTwi This thread Refback 08-04-2009 06:25 PM
Mobiel device automatisch doorlaten sturen - SiteDeals This thread Refback 04-18-2009 04:45 PM
Eksperten | Programmering :: Script :: JavaScript :: Tjekke om bruger er på mobiltelefon This thread Refback 12-06-2008 07:07 AM
Mobile versions of websites This thread Refback 12-01-2008 04:34 AM
6 Ways to create a mobile version of your site :: 10,000 Words :: multimedia, online journalism news and reviews This thread Refback 10-08-2008 12:09 PM
10,000 Words :: where journalism and technology meet :: multimedia, online journalism news and reviews This thread Refback 10-07-2008 09:10 PM
Forum fotografia : photo4u.it :: Fotografia digitale e analogica :: aiuto web This thread Refback 08-08-2008 10:21 PM
Forum fotografia : photo4u.it :: Fotografia digitale e analogica :: aiuto web This thread Refback 08-08-2008 03:18 PM


All times are GMT +1. The time now is 04:39 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 RC7